{"db_id": "department_management", "id": 0, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many heads of the departments are older than 56 ?", "output": "SELECT count(*) FROM head WHERE age > 56", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many heads of the departments are older than 56 ?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_management", "id": 1, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name, born state and age of the heads of departments ordered by age.", "output": "SELECT name , born_state , age FROM head ORDER BY age", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name, born state and age of the heads of departments ordered by age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_management", "id": 2, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the creation year, name and budget of each department.", "output": "SELECT creation , name , budget_in_billions FROM department", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the creation year, name and budget of each department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_management", "id": 3, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum and minimum budget of the departments?", "output": "SELECT max(budget_in_billions) , min(budget_in_billions) FROM department", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum and minimum budget of the departments?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_management", "id": 4, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of employees of the departments whose rank is between 10 and 15?", "output": "SELECT avg(num_employees) FROM department WHERE ranking BETWEEN 10 AND 15", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average number of employees of the departments whose rank is between 10 and 15?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_management", "id": 5, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the heads who are born outside the California state?", "output": "SELECT name FROM head WHERE born_state != 'California'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the heads who are born outside the California state?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_management", "id": 6, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct creation years of the departments managed by a secretary born in state 'Alabama'?", "output": "SELECT DISTINCT T1.creation FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T3.born_state = 'Alabama'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct creation years of the departments managed by a secretary born in state 'Alabama'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_management", "id": 7, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the states where at least 3 heads were born?", "output": "SELECT born_state FROM head GROUP BY born_state HAVING count(*) >= 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the states where at least 3 heads were born?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_management", "id": 8, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In which year were most departments established?", "output": "SELECT creation FROM department GROUP BY creation ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: In which year were most departments established?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_management", "id": 9, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes'?", "output": "SELECT T1.name , T1.num_employees FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id WHERE T2.temporary_acting = 'Yes'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_management", "id": 10, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many acting statuses are there?", "output": "SELECT count(DISTINCT temporary_acting) FROM management", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many acting statuses are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_management", "id": 11, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many departments are led by heads who are not mentioned?", "output": "SELECT count(*) FROM department WHERE department_id NOT IN (SELECT department_id FROM management);", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many departments are led by heads who are not mentioned?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_management", "id": 12, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct ages of the heads who are acting?", "output": "SELECT DISTINCT T1.age FROM management AS T2 JOIN head AS T1 ON T1.head_id = T2.head_id WHERE T2.temporary_acting = 'Yes'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct ages of the heads who are acting?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_management", "id": 13, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the states where both the secretary of 'Treasury' department and the secretary of 'Homeland Security' were born.", "output": "SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T1.name = 'Treasury' INTERSECT SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T1.name = 'Homeland Security'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the states where both the secretary of 'Treasury' department and the secretary of 'Homeland Security' were born.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_management", "id": 14, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which department has more than 1 head at a time? List the id, name and the number of heads.", "output": "SELECT T1.department_id , T1.name , count(*) FROM management AS T2 JOIN department AS T1 ON T1.department_id = T2.department_id GROUP BY T1.department_id HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which department has more than 1 head at a time? List the id, name and the number of heads.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_management", "id": 15, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which head's name has the substring 'Ha'? List the id and name.", "output": "SELECT head_id , name FROM head WHERE name LIKE '%Ha%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which head's name has the substring 'Ha'? List the id and name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 16, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many farms are there?", "output": "SELECT count(*) FROM farm", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many farms are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 17, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of farms.", "output": "SELECT count(*) FROM farm", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of farms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 18, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the total number of horses on farms in ascending order.", "output": "SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the total number of horses on farms in ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 19, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total horses record for each farm, sorted ascending?", "output": "SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total horses record for each farm, sorted ascending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 20, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the hosts of competitions whose theme is not \"Aliens\"?", "output": "SELECT Hosts FROM farm_competition WHERE Theme != 'Aliens'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the hosts of competitions whose theme is not \"Aliens\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 21, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the hosts of competitions for which the theme is not Aliens?", "output": "SELECT Hosts FROM farm_competition WHERE Theme != 'Aliens'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the hosts of competitions for which the theme is not Aliens?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 22, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the themes of farm competitions sorted by year in ascending order?", "output": "SELECT Theme FROM farm_competition ORDER BY YEAR ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the themes of farm competitions sorted by year in ascending order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 23, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the themes of farm competitions, sorted by year ascending.", "output": "SELECT Theme FROM farm_competition ORDER BY YEAR ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the themes of farm competitions, sorted by year ascending.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 24, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of working horses of farms with more than 5000 total number of horses?", "output": "SELECT avg(Working_Horses) FROM farm WHERE Total_Horses > 5000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average number of working horses of farms with more than 5000 total number of horses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 25, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the average number of working horses on farms with more than 5000 total horses.", "output": "SELECT avg(Working_Horses) FROM farm WHERE Total_Horses > 5000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the average number of working horses on farms with more than 5000 total horses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 26, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum and minimum number of cows across all farms.", "output": "SELECT max(Cows) , min(Cows) FROM farm", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum and minimum number of cows across all farms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 27, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the maximum and minimum number of cows across all farms.", "output": "SELECT max(Cows) , min(Cows) FROM farm", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the maximum and minimum number of cows across all farms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 28, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different statuses do cities have?", "output": "SELECT count(DISTINCT Status) FROM city", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different statuses do cities have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 29, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different statuses.", "output": "SELECT count(DISTINCT Status) FROM city", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of different statuses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 30, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List official names of cities in descending order of population.", "output": "SELECT Official_Name FROM city ORDER BY Population DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List official names of cities in descending order of population.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 31, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the official names of cities, ordered descending by population?", "output": "SELECT Official_Name FROM city ORDER BY Population DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the official names of cities, ordered descending by population?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 32, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the official name and status of the city with the largest population.", "output": "SELECT Official_Name , Status FROM city ORDER BY Population DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the official name and status of the city with the largest population.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 33, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the official name and status of the city with the most residents?", "output": "SELECT Official_Name , Status FROM city ORDER BY Population DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the official name and status of the city with the most residents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 34, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the years and the official names of the host cities of competitions.", "output": "SELECT T2.Year , T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the years and the official names of the host cities of competitions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 35, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the years and official names of the cities of each competition.", "output": "SELECT T2.Year , T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the years and official names of the cities of each competition.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 36, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the official names of the cities that have hosted more than one competition.", "output": "SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the official names of the cities that have hosted more than one competition.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 37, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the official names of cities that have hosted more than one competition?", "output": "SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the official names of cities that have hosted more than one competition?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 38, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the status of the city that has hosted the greatest number of competitions.", "output": "SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the status of the city that has hosted the greatest number of competitions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 39, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the status of the city that has hosted the most competitions?", "output": "SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the status of the city that has hosted the most competitions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 40, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the themes of competitions with host cities having populations larger than 1000.", "output": "SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the themes of competitions with host cities having populations larger than 1000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 41, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the themes of competitions that have corresponding host cities with more than 1000 residents?", "output": "SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the themes of competitions that have corresponding host cities with more than 1000 residents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 42, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the different statuses of cities and the average population of cities with each status.", "output": "SELECT Status , avg(Population) FROM city GROUP BY Status", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the different statuses of cities and the average population of cities with each status.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 43, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the statuses and average populations of each city?", "output": "SELECT Status , avg(Population) FROM city GROUP BY Status", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the statuses and average populations of each city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 44, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the different statuses, ordered by the number of cities that have each.", "output": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the different statuses, ordered by the number of cities that have each.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 45, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the different statuses of cities, ascending by frequency.", "output": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the different statuses of cities, ascending by frequency.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 46, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the most common type of Status across cities.", "output": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the most common type of Status across cities.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 47, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most common status across all cities?", "output": "SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most common status across all cities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 48, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the official names of cities that have not held any competition.", "output": "SELECT Official_Name FROM city WHERE City_ID NOT IN (SELECT Host_city_ID FROM farm_competition)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the official names of cities that have not held any competition.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 49, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the official names of cities that have not hosted a farm competition?", "output": "SELECT Official_Name FROM city WHERE City_ID NOT IN (SELECT Host_city_ID FROM farm_competition)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the official names of cities that have not hosted a farm competition?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 50, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the status shared by cities with population bigger than 1500 and smaller than 500.", "output": "SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the status shared by cities with population bigger than 1500 and smaller than 500.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 51, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which statuses correspond to both cities that have a population over 1500 and cities that have a population lower than 500?", "output": "SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which statuses correspond to both cities that have a population over 1500 and cities that have a population lower than 500?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 52, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the official names of cities with population bigger than 1500 or smaller than 500.", "output": "SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the official names of cities with population bigger than 1500 or smaller than 500.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 53, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the official names of cities that have population over 1500 or less than 500?", "output": "SELECT Official_Name FROM city WHERE Population > 1500 OR Population < 500", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the official names of cities that have population over 1500 or less than 500?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 54, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the census ranking of cities whose status are not \"Village\".", "output": "SELECT Census_Ranking FROM city WHERE Status != \"Village\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the census ranking of cities whose status are not \"Village\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "farm", "id": 55, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the census rankings of cities that do not have the status \"Village\"?", "output": "SELECT Census_Ranking FROM city WHERE Status != \"Village\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the census rankings of cities that do not have the status \"Village\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 56, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "which course has most number of registered students?", "output": "SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: which course has most number of registered students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 57, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the course with the most registered students?", "output": "SELECT T1.course_name FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_Id GROUP BY T1.course_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the course with the most registered students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 58, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what is id of students who registered some courses but the least number of courses in these students?", "output": "SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what is id of students who registered some courses but the least number of courses in these students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 59, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the students who registered for some courses but had the least number of courses for all students?", "output": "SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the students who registered for some courses but had the least number of courses for all students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 60, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what are the first name and last name of all candidates?", "output": "SELECT T2.first_name , T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what are the first name and last name of all candidates?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 61, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of all the candidates?", "output": "SELECT T2.first_name , T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last names of all the candidates?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 62, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the id of students who never attends courses?", "output": "SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the id of students who never attends courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 63, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of every student who has never attended a course?", "output": "SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of every student who has never attended a course?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 64, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the id of students who attended some courses?", "output": "SELECT student_id FROM student_course_attendance", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the id of students who attended some courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 65, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all students who have attended at least one course?", "output": "SELECT student_id FROM student_course_attendance", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all students who have attended at least one course?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 66, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all students for courses and what are the names of those courses?", "output": "SELECT T1.student_id , T2.course_name FROM student_course_registrations AS T1 JOIN courses AS T2 ON T1.course_id = T2.course_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all students for courses and what are the names of those courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 67, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is detail of the student who most recently registered course?", "output": "SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is detail of the student who most recently registered course?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 68, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What details do we have on the students who registered for courses most recently?", "output": "SELECT T2.student_details FROM student_course_registrations AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What details do we have on the students who registered for courses most recently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 69, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students attend course English?", "output": "SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"English\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students attend course English?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 70, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are attending English courses?", "output": "SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"English\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students are attending English courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 71, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many courses do the student whose id is 171 attend?", "output": "SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many courses do the student whose id is 171 attend?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 72, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many courses does the student with id 171 actually attend?", "output": "SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many courses does the student with id 171 actually attend?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 73, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find id of the candidate whose email is stanley.monahan@example.org?", "output": "SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = \"stanley.monahan@example.org\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find id of the candidate whose email is stanley.monahan@example.org?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 74, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the candidate whose email is stanley.monahan@example.org?", "output": "SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = \"stanley.monahan@example.org\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the candidate whose email is stanley.monahan@example.org?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 75, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find id of the candidate who most recently accessed the course?", "output": "SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find id of the candidate who most recently accessed the course?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 76, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the candidate who most recently accessed the course?", "output": "SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the candidate who most recently accessed the course?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 77, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is detail of the student who registered the most number of courses?", "output": "SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is detail of the student who registered the most number of courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 78, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details of the student who registered for the most number of courses?", "output": "SELECT T1.student_details FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details of the student who registered for the most number of courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 79, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the id of students who registered some courses and the number of their registered courses?", "output": "SELECT T1.student_id , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the id of students who registered some courses and the number of their registered courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 80, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For every student who is registered for some course, how many courses are they registered for?", "output": "SELECT T1.student_id , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For every student who is registered for some course, how many courses are they registered for?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 81, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many registed students do each course have? List course name and the number of their registered students?", "output": "SELECT T3.course_name , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many registed students do each course have? List course name and the number of their registered students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 82, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each course id, how many students are registered and what are the course names?", "output": "SELECT T3.course_name , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each course id, how many students are registered and what are the course names?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 83, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find id of candidates whose assessment code is \"Pass\"?", "output": "SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = \"Pass\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find id of candidates whose assessment code is \"Pass\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 84, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the candidates that have an outcome code of Pass?", "output": "SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = \"Pass\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the candidates that have an outcome code of Pass?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 85, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the cell mobile number of the candidates whose assessment code is \"Fail\"?", "output": "SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = \"Fail\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the cell mobile number of the candidates whose assessment code is \"Fail\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 86, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the cell phone numbers of the candidates that received an assessment code of \"Fail\"?", "output": "SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = \"Fail\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the cell phone numbers of the candidates that received an assessment code of \"Fail\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 87, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the id of students who registered course 301?", "output": "SELECT student_id FROM student_course_attendance WHERE course_id = 301", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the id of students who registered course 301?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 88, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the students who registered for course 301?", "output": "SELECT student_id FROM student_course_attendance WHERE course_id = 301", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the students who registered for course 301?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 89, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the student who most recently registered course 301?", "output": "SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the student who most recently registered course 301?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 90, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the students who registered for course 301 most recently?", "output": "SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the students who registered for course 301 most recently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 91, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find distinct cities of addresses of people?", "output": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find distinct cities of addresses of people?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 92, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different cities where people live?", "output": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different cities where people live?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 93, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find distinct cities of address of students?", "output": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find distinct cities of address of students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 94, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different cities where students live?", "output": "SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different cities where students live?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 95, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of courses in alphabetical order?", "output": "SELECT course_name FROM courses ORDER BY course_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of courses in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 96, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the courses in alphabetical order?", "output": "SELECT course_name FROM courses ORDER BY course_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the courses in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 97, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the first names of people in alphabetical order?", "output": "SELECT first_name FROM people ORDER BY first_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the first names of people in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 98, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of the people in alphabetical order?", "output": "SELECT first_name FROM people ORDER BY first_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of the people in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 99, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the id of students who registered courses or attended courses?", "output": "SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the id of students who registered courses or attended courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 100, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the students who either registered or attended a course?", "output": "SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the students who either registered or attended a course?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 101, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of courses which are registered or attended by student whose id is 121?", "output": "SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id of courses which are registered or attended by student whose id is 121?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 102, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the courses that are registered or attended by the student whose id is 121?", "output": "SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the courses that are registered or attended by the student whose id is 121?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 103, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all info of students who registered courses but not attended courses?", "output": "SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all info of students who registered courses but not attended courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 104, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all details of the students who registered but did not attend any course?", "output": "SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all details of the students who registered but did not attend any course?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 105, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the id of students who registered course statistics in the order of registration date.", "output": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"statistics\" ORDER BY T2.registration_date", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the id of students who registered course statistics in the order of registration date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 106, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the students who registered course statistics by order of registration date?", "output": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"statistics\" ORDER BY T2.registration_date", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the students who registered course statistics by order of registration date?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 107, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the id of students who attended statistics courses in the order of attendance date.", "output": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"statistics\" ORDER BY T2.date_of_attendance", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the id of students who attended statistics courses in the order of attendance date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_assessment", "id": 108, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the students who attended courses in the statistics department in order of attendance date.", "output": "SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"statistics\" ORDER BY T2.date_of_attendance", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the students who attended courses in the statistics department in order of attendance date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 109, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the dates when the max temperature was higher than 85.", "output": "SELECT date FROM weather WHERE max_temperature_f > 85", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the dates when the max temperature was higher than 85.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 110, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the dates with a maximum temperature higher than 85?", "output": "SELECT date FROM weather WHERE max_temperature_f > 85", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the dates with a maximum temperature higher than 85?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 111, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of stations that have latitude lower than 37.5?", "output": "SELECT name FROM station WHERE lat < 37.5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of stations that have latitude lower than 37.5?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 112, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all stations with a latitude smaller than 37.5?", "output": "SELECT name FROM station WHERE lat < 37.5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all stations with a latitude smaller than 37.5?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 113, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each city, return the highest latitude among its stations.", "output": "SELECT city , max(lat) FROM station GROUP BY city", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each city, return the highest latitude among its stations.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 114, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each city, what is the highest latitude for its stations?", "output": "SELECT city , max(lat) FROM station GROUP BY city", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each city, what is the highest latitude for its stations?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 115, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the start station and end station for the trips with the three oldest id.", "output": "SELECT start_station_name , end_station_name FROM trip ORDER BY id LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the start station and end station for the trips with the three oldest id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 116, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the station station and end station for the trips with the three smallest ids?", "output": "SELECT start_station_name , end_station_name FROM trip ORDER BY id LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the station station and end station for the trips with the three smallest ids?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 117, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average latitude and longitude of stations located in San Jose city?", "output": "SELECT avg(lat) , avg(long) FROM station WHERE city = \"San Jose\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average latitude and longitude of stations located in San Jose city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 118, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average latitude and longitude in San Jose?", "output": "SELECT avg(lat) , avg(long) FROM station WHERE city = \"San Jose\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average latitude and longitude in San Jose?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 119, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the trip that has the shortest duration?", "output": "SELECT id FROM trip ORDER BY duration LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the trip that has the shortest duration?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 120, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the shortest trip?", "output": "SELECT id FROM trip ORDER BY duration LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the shortest trip?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 121, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total and maximum duration of trips with bike id 636?", "output": "SELECT sum(duration) , max(duration) FROM trip WHERE bike_id = 636", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total and maximum duration of trips with bike id 636?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 122, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total and maximum duration for all trips with the bike id 636?", "output": "SELECT sum(duration) , max(duration) FROM trip WHERE bike_id = 636", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total and maximum duration for all trips with the bike id 636?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 123, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each zip code, return the average mean temperature of August there.", "output": "SELECT zip_code , avg(mean_temperature_f) FROM weather WHERE date LIKE \"8/%\" GROUP BY zip_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each zip code, return the average mean temperature of August there.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 124, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each zip code, what is the average mean temperature for all dates that start with '8'?", "output": "SELECT zip_code , avg(mean_temperature_f) FROM weather WHERE date LIKE \"8/%\" GROUP BY zip_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each zip code, what is the average mean temperature for all dates that start with '8'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 125, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "From the trip record, find the number of unique bikes.", "output": "SELECT count(DISTINCT bike_id) FROM trip", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: From the trip record, find the number of unique bikes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 126, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different bike ids are there?", "output": "SELECT count(DISTINCT bike_id) FROM trip", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different bike ids are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 127, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of distinct cities the stations are located at?", "output": "SELECT count(DISTINCT city) FROM station", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of distinct cities the stations are located at?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 128, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different cities have these stations?", "output": "SELECT count(DISTINCT city) FROM station", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different cities have these stations?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 129, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many stations does Mountain View city has?", "output": "SELECT COUNT(*) FROM station WHERE city = \"Mountain View\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many stations does Mountain View city has?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 130, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many stations are in Mountain View?", "output": "SELECT COUNT(*) FROM station WHERE city = \"Mountain View\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many stations are in Mountain View?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 131, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the unique name for stations that have ever had 7 bikes available.", "output": "SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the unique name for stations that have ever had 7 bikes available.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 132, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different names for each station that has ever had 7 bikes available?", "output": "SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different names for each station that has ever had 7 bikes available?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 133, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which start station had the most trips starting from August? Give me the name and id of the station.", "output": "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", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which start station had the most trips starting from August? Give me the name and id of the station.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 134, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the start station's name and id for the one that had the most start trips in August?", "output": "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", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the start station's name and id for the one that had the most start trips in August?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 135, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which bike traveled the most often in zip code 94002?", "output": "SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which bike traveled the most often in zip code 94002?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 136, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the bike that traveled the most in 94002?", "output": "SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the bike that traveled the most in 94002?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 137, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many days had both mean humidity above 50 and mean visibility above 8?", "output": "SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many days had both mean humidity above 50 and mean visibility above 8?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 138, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of days that had an average humity above 50 and an average visibility above 8?", "output": "SELECT COUNT(*) FROM weather WHERE mean_humidity > 50 AND mean_visibility_miles > 8", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of days that had an average humity above 50 and an average visibility above 8?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 139, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the latitude, longitude, city of the station from which the shortest trip started?", "output": "SELECT T1.lat , T1.long , T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id ORDER BY T2.duration LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the latitude, longitude, city of the station from which the shortest trip started?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 140, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the latitude, longitude, and city of the station from which the trip with smallest duration started?", "output": "SELECT T1.lat , T1.long , T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id ORDER BY T2.duration LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the latitude, longitude, and city of the station from which the trip with smallest duration started?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 141, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of stations that are located in San Francisco and have average bike availability above 10.", "output": "SELECT id FROM station WHERE city = \"San Francisco\" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING avg(bikes_available) > 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of stations that are located in San Francisco and have average bike availability above 10.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 142, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the stations in San Francisco that normally have more than 10 bikes available?", "output": "SELECT id FROM station WHERE city = \"San Francisco\" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING avg(bikes_available) > 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the stations in San Francisco that normally have more than 10 bikes available?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 143, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and ids of stations that had more than 14 bikes available on average or were installed in December?", "output": "SELECT T1.name , T1.id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING avg(T2.bikes_available) > 14 UNION SELECT name , id FROM station WHERE installation_date LIKE \"12/%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and ids of stations that had more than 14 bikes available on average or were installed in December?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 144, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and ids of all stations that have more than 14 bikes available on average or had bikes installed in December?", "output": "SELECT T1.name , T1.id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING avg(T2.bikes_available) > 14 UNION SELECT name , id FROM station WHERE installation_date LIKE \"12/%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and ids of all stations that have more than 14 bikes available on average or had bikes installed in December?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 145, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the 3 most common cloud cover rates in the region of zip code 94107?", "output": "SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT (*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the 3 most common cloud cover rates in the region of zip code 94107?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 146, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the 3 most common cloud covers in the zip code of 94107?", "output": "SELECT cloud_cover FROM weather WHERE zip_code = 94107 GROUP BY cloud_cover ORDER BY COUNT (*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the 3 most common cloud covers in the zip code of 94107?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 147, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the zip code in which the average mean sea level pressure is the lowest?", "output": "SELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the zip code in which the average mean sea level pressure is the lowest?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 148, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the zip code that has the lowest average mean sea level pressure?", "output": "SELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the zip code that has the lowest average mean sea level pressure?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 149, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average bike availability in stations that are not located in Palo Alto?", "output": "SELECT avg(bikes_available) FROM status WHERE station_id NOT IN (SELECT id FROM station WHERE city = \"Palo Alto\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average bike availability in stations that are not located in Palo Alto?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 150, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average bike availablility for stations not in Palo Alto?", "output": "SELECT avg(bikes_available) FROM status WHERE station_id NOT IN (SELECT id FROM station WHERE city = \"Palo Alto\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average bike availablility for stations not in Palo Alto?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 151, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average longitude of stations that never had bike availability more than 10?", "output": "SELECT avg(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING max(bikes_available) > 10)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average longitude of stations that never had bike availability more than 10?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 152, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the mean longitude for all stations that have never had more than 10 bikes available?", "output": "SELECT avg(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING max(bikes_available) > 10)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the mean longitude for all stations that have never had more than 10 bikes available?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 153, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When and in what zip code did max temperature reach 80?", "output": "SELECT date , zip_code FROM weather WHERE max_temperature_f >= 80", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When and in what zip code did max temperature reach 80?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 154, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What zip codes have a station with a max temperature greater than or equal to 80 and when did it reach that temperature?", "output": "SELECT date , zip_code FROM weather WHERE max_temperature_f >= 80", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What zip codes have a station with a max temperature greater than or equal to 80 and when did it reach that temperature?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 155, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me ids for all the trip that took place in a zip code area with average mean temperature above 60.", "output": "SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.zip_code HAVING avg(T2.mean_temperature_f) > 60", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me ids for all the trip that took place in a zip code area with average mean temperature above 60.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 156, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each zip code, find the ids of all trips that have a higher average mean temperature above 60?", "output": "SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.zip_code HAVING avg(T2.mean_temperature_f) > 60", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each zip code, find the ids of all trips that have a higher average mean temperature above 60?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 157, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each zip code, return how many times max wind speed reached 25?", "output": "SELECT zip_code , count(*) FROM weather WHERE max_wind_Speed_mph >= 25 GROUP BY zip_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each zip code, return how many times max wind speed reached 25?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 158, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each zip code, how many times has the maximum wind speed reached 25 mph?", "output": "SELECT zip_code , count(*) FROM weather WHERE max_wind_Speed_mph >= 25 GROUP BY zip_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each zip code, how many times has the maximum wind speed reached 25 mph?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 159, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "On which day and in which zip code was the min dew point lower than any day in zip code 94107?", "output": "SELECT date , zip_code FROM weather WHERE min_dew_point_f < (SELECT min(min_dew_point_f) FROM weather WHERE zip_code = 94107)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: On which day and in which zip code was the min dew point lower than any day in zip code 94107?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 160, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which days had a minimum dew point smaller than any day in zip code 94107, and in which zip codes were those measurements taken?", "output": "SELECT date , zip_code FROM weather WHERE min_dew_point_f < (SELECT min(min_dew_point_f) FROM weather WHERE zip_code = 94107)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which days had a minimum dew point smaller than any day in zip code 94107, and in which zip codes were those measurements taken?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 161, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each trip, return its ending station's installation date.", "output": "SELECT T1.id , T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each trip, return its ending station's installation date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 162, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the installation date for each ending station on all the trips?", "output": "SELECT T1.id , T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the installation date for each ending station on all the trips?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 163, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which trip started from the station with the largest dock count? Give me the trip id.", "output": "SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id = T2.id ORDER BY T2.dock_count DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which trip started from the station with the largest dock count? Give me the trip id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 164, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the trip that started from the station with the highest dock count?", "output": "SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id = T2.id ORDER BY T2.dock_count DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the trip that started from the station with the highest dock count?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 165, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of trips that did not end in San Francisco city.", "output": "SELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city != \"San Francisco\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of trips that did not end in San Francisco city.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 166, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many trips did not end in San Francisco?", "output": "SELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city != \"San Francisco\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many trips did not end in San Francisco?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 167, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In zip code 94107, on which day neither Fog nor Rain was not observed?", "output": "SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS != \"Fog\" AND EVENTS != \"Rain\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: In zip code 94107, on which day neither Fog nor Rain was not observed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 168, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "On which day has it neither been foggy nor rained in the zip code of 94107?", "output": "SELECT date FROM weather WHERE zip_code = 94107 AND EVENTS != \"Fog\" AND EVENTS != \"Rain\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: On which day has it neither been foggy nor rained in the zip code of 94107?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 169, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of stations that have latitude above 37.4 and never had bike availability below 7?", "output": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available) < 7", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of stations that have latitude above 37.4 and never had bike availability below 7?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 170, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all stations that have a latitude above 37.4 and have never had less than 7 bikes available?", "output": "SELECT id FROM station WHERE lat > 37.4 EXCEPT SELECT station_id FROM status GROUP BY station_id HAVING min(bikes_available) < 7", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all stations that have a latitude above 37.4 and have never had less than 7 bikes available?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 171, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are names of stations that have average bike availability above 10 and are not located in San Jose city?", "output": "SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING avg(bikes_available) > 10 EXCEPT SELECT name FROM station WHERE city = \"San Jose\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are names of stations that have average bike availability above 10 and are not located in San Jose city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 172, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all stations that have more than 10 bikes available and are not located in San Jose?", "output": "SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING avg(bikes_available) > 10 EXCEPT SELECT name FROM station WHERE city = \"San Jose\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all stations that have more than 10 bikes available and are not located in San Jose?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 173, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name, latitude, and city of the station with the lowest latitude?", "output": "SELECT name , lat , city FROM station ORDER BY lat LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name, latitude, and city of the station with the lowest latitude?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 174, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name, latitude, and city of the station that is located the furthest South?", "output": "SELECT name , lat , city FROM station ORDER BY lat LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name, latitude, and city of the station that is located the furthest South?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 175, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the date, mean temperature and mean humidity for the top 3 days with the largest max gust speeds?", "output": "SELECT date , mean_temperature_f , mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the date, mean temperature and mean humidity for the top 3 days with the largest max gust speeds?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 176, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the date, average temperature and mean humidity for the days with the 3 largest maximum gust speeds?", "output": "SELECT date , mean_temperature_f , mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the date, average temperature and mean humidity for the days with the 3 largest maximum gust speeds?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 177, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name and the number of stations for all the cities that have at least 15 stations.", "output": "SELECT city , COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name and the number of stations for all the cities that have at least 15 stations.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 178, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of every city that has at least 15 stations and how many stations does it have?", "output": "SELECT city , COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of every city that has at least 15 stations and how many stations does it have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 179, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the ids and names of stations from which at least 200 trips started.", "output": "SELECT start_station_id , start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the ids and names of stations from which at least 200 trips started.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 180, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and names of all start stations that were the beginning of at least 200 trips?", "output": "SELECT start_station_id , start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids and names of all start stations that were the beginning of at least 200 trips?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 181, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the zip code in which the average mean visibility is lower than 10.", "output": "SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_visibility_miles) < 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the zip code in which the average mean visibility is lower than 10.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 182, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each zip code, select all those that have an average mean visiblity below 10.", "output": "SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_visibility_miles) < 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each zip code, select all those that have an average mean visiblity below 10.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 183, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the cities in a decreasing order of each city's stations' highest latitude.", "output": "SELECT city FROM station GROUP BY city ORDER BY max(lat) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the cities in a decreasing order of each city's stations' highest latitude.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 184, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each city, list their names in decreasing order by their highest station latitude.", "output": "SELECT city FROM station GROUP BY city ORDER BY max(lat) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each city, list their names in decreasing order by their highest station latitude.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 185, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the dates that had the top 5 cloud cover rates? Also tell me the cloud cover rate.", "output": "SELECT date , cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the dates that had the top 5 cloud cover rates? Also tell me the cloud cover rate.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 186, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the dates that have the 5 highest cloud cover rates and what are the rates?", "output": "SELECT date , cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the dates that have the 5 highest cloud cover rates and what are the rates?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 187, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and durations of the trips with the top 3 durations?", "output": "SELECT id , duration FROM trip ORDER BY duration DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids and durations of the trips with the top 3 durations?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 188, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the trips that lasted the longest and how long did they last?", "output": "SELECT id , duration FROM trip ORDER BY duration DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the trips that lasted the longest and how long did they last?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 189, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each station, return its longitude and the average duration of trips that started from the station.", "output": "SELECT T1.name , T1.long , avg(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each station, return its longitude and the average duration of trips that started from the station.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 190, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each start station id, what is its name, longitude and average duration of trips started there?", "output": "SELECT T1.name , T1.long , avg(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each start station id, what is its name, longitude and average duration of trips started there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 191, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each station, find its latitude and the minimum duration of trips that ended at the station.", "output": "SELECT T1.name , T1.lat , min(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.end_station_id GROUP BY T2.end_station_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each station, find its latitude and the minimum duration of trips that ended at the station.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 192, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each end station id, what is its name, latitude, and minimum duration for trips ended there?", "output": "SELECT T1.name , T1.lat , min(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.end_station_id GROUP BY T2.end_station_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each end station id, what is its name, latitude, and minimum duration for trips ended there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 193, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the distinct stations from which a trip of duration below 100 started.", "output": "SELECT DISTINCT start_station_name FROM trip WHERE duration < 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the distinct stations from which a trip of duration below 100 started.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 194, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the different start station names for a trip that lasted less than 100?", "output": "SELECT DISTINCT start_station_name FROM trip WHERE duration < 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the different start station names for a trip that lasted less than 100?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 195, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the zip codes in which the max dew point have never reached 70.", "output": "SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the zip codes in which the max dew point have never reached 70.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 196, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the different zip codes that have a maximum dew point that was always below 70?", "output": "SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the different zip codes that have a maximum dew point that was always below 70?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 197, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id for the trips that lasted at least as long as the average duration of trips in zip code 94103.", "output": "SELECT id FROM trip WHERE duration >= (SELECT avg(duration) FROM trip WHERE zip_code = 94103)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id for the trips that lasted at least as long as the average duration of trips in zip code 94103.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 198, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all trips that had a duration as long as the average trip duration in the zip code 94103?", "output": "SELECT id FROM trip WHERE duration >= (SELECT avg(duration) FROM trip WHERE zip_code = 94103)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all trips that had a duration as long as the average trip duration in the zip code 94103?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 199, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the dates in which the mean sea level pressure was between 30.3 and 31?", "output": "SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the dates in which the mean sea level pressure was between 30.3 and 31?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 200, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the dates that have an average sea level pressure between 30.3 and 31?", "output": "SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the dates that have an average sea level pressure between 30.3 and 31?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 201, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference.", "output": "SELECT date , max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 202, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the days that had the smallest temperature range, and what was that range?", "output": "SELECT date , max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the days that had the smallest temperature range, and what was that range?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 203, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the id and name of the stations that have ever had more than 12 bikes available?", "output": "SELECT DISTINCT T1.id , T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the id and name of the stations that have ever had more than 12 bikes available?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 204, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different ids and names of the stations that have had more than 12 bikes available?", "output": "SELECT DISTINCT T1.id , T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different ids and names of the stations that have had more than 12 bikes available?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 205, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the zip code where the average mean humidity is below 70 and at least 100 trips took place.", "output": "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", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the zip code where the average mean humidity is below 70 and at least 100 trips took place.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 206, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the zip codes that have an average mean humidity below 70 and had at least 100 trips come through there?", "output": "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", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the zip codes that have an average mean humidity below 70 and had at least 100 trips come through there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 207, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT name FROM station WHERE city = \"Palo Alto\" EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING count(*) > 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 208, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the stations that are located in Palo Alto but have never been the ending point of the trips", "output": "SELECT name FROM station WHERE city = \"Palo Alto\" EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING count(*) > 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the stations that are located in Palo Alto but have never been the ending point of the trips,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 209, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many trips started from Mountain View city and ended at Palo Alto city?", "output": "SELECT count(*) FROM station AS T1 JOIN trip AS T2 JOIN station AS T3 JOIN trip AS T4 ON T1.id = T2.start_station_id AND T2.id = T4.id AND T3.id = T4.end_station_id WHERE T1.city = \"Mountain View\" AND T3.city = \"Palo Alto\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many trips started from Mountain View city and ended at Palo Alto city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 210, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many trips stated from a station in Mountain View and ended at one in Palo Alto?", "output": "SELECT count(*) FROM station AS T1 JOIN trip AS T2 JOIN station AS T3 JOIN trip AS T4 ON T1.id = T2.start_station_id AND T2.id = T4.id AND T3.id = T4.end_station_id WHERE T1.city = \"Mountain View\" AND T3.city = \"Palo Alto\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many trips stated from a station in Mountain View and ended at one in Palo Alto?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 211, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average latitude and longitude of the starting points of all trips?", "output": "SELECT avg(T1.lat) , avg(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average latitude and longitude of the starting points of all trips?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "bike_1", "id": 212, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average latitude and longitude of all starting stations for the trips?", "output": "SELECT avg(T1.lat) , avg(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average latitude and longitude of all starting stations for the trips?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 213, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many books are there?", "output": "SELECT count(*) FROM book", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: How many books are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 214, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the writers of the books in ascending alphabetical order.", "output": "SELECT Writer FROM book ORDER BY Writer ASC", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: List the writers of the books in ascending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 215, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the titles of the books in ascending order of issues.", "output": "SELECT Title FROM book ORDER BY Issues ASC", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: List the titles of the books in ascending order of issues.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 216, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of the books whose writer is not \"Elaine Lee\"?", "output": "SELECT Title FROM book WHERE Writer != \"Elaine Lee\"", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: What are the titles of the books whose writer is not \"Elaine Lee\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 217, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the title and issues of the books?", "output": "SELECT Title , Issues FROM book", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: What are the title and issues of the books?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 218, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the dates of publications in descending order of price?", "output": "SELECT Publication_Date FROM publication ORDER BY Price DESC", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: What are the dates of publications in descending order of price?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 219, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct publishers of publications with price higher than 5000000?", "output": "SELECT DISTINCT Publisher FROM publication WHERE Price > 5000000", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: What are the distinct publishers of publications with price higher than 5000000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 220, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the publisher of the publication with the highest price.", "output": "SELECT Publisher FROM publication ORDER BY Price DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: List the publisher of the publication with the highest price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 221, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the publication dates of publications with 3 lowest prices.", "output": "SELECT Publication_Date FROM publication ORDER BY Price ASC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: List the publication dates of publications with 3 lowest prices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 222, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the title and publication dates of books.", "output": "SELECT T1.Title , T2.Publication_Date FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: Show the title and publication dates of books.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 223, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show writers who have published a book with price more than 4000000.", "output": "SELECT T1.Writer FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID WHERE T2.Price > 4000000", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: Show writers who have published a book with price more than 4000000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 224, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the titles of books in descending order of publication price.", "output": "SELECT T1.Title FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID ORDER BY T2.Price DESC", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: Show the titles of books in descending order of publication price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 225, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show publishers that have more than one publication.", "output": "SELECT Publisher FROM publication GROUP BY Publisher HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: Show publishers that have more than one publication.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 226, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show different publishers together with the number of publications they have.", "output": "SELECT Publisher , COUNT(*) FROM publication GROUP BY Publisher", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: Show different publishers together with the number of publications they have.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 227, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the most common publication date.", "output": "SELECT Publication_Date FROM publication GROUP BY Publication_Date ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: Please show the most common publication date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 228, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the writers who have written more than one book.", "output": "SELECT Writer FROM book GROUP BY Writer HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: List the writers who have written more than one book.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 229, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the titles of books that are not published.", "output": "SELECT Title FROM book WHERE Book_ID NOT IN (SELECT Book_ID FROM publication)", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: List the titles of books that are not published.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 230, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the publishers that have publications with price higher than 10000000 and publications with price lower than 5000000.", "output": "SELECT Publisher FROM publication WHERE Price > 10000000 INTERSECT SELECT Publisher FROM publication WHERE Price < 5000000", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: Show the publishers that have publications with price higher than 10000000 and publications with price lower than 5000000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 231, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of distinct publication dates?", "output": "SELECT COUNT (DISTINCT Publication_Date) FROM publication", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: What is the number of distinct publication dates?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 232, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct publication dates are there in our record?", "output": "SELECT COUNT (DISTINCT Publication_Date) FROM publication", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: How many distinct publication dates are there in our record?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "book_2", "id": 233, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the prices of publications whose publisher is either \"Person\" or \"Wiley\"", "output": "SELECT Price FROM publication WHERE Publisher = \"Person\" OR Publisher = \"Wiley\"", "input": "Based on \n# the table&column(database schema) information {'publication': ['Publication_ID', 'Book_ID', 'Publisher', 'Publication_Date', 'Price'], 'book': ['Book_ID', 'Title', 'Issues', 'Writer']} and \n# the user question: Show the prices of publications whose publisher is either \"Person\" or \"Wiley\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 234, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many actors are there?", "output": "SELECT count(*) FROM actor", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: How many actors are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 235, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of actors.", "output": "SELECT count(*) FROM actor", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Count the number of actors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 236, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of actors in ascending alphabetical order.", "output": "SELECT Name FROM actor ORDER BY Name ASC", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: List the name of actors in ascending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 237, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of actors, ordered alphabetically?", "output": "SELECT Name FROM actor ORDER BY Name ASC", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: What are the names of actors, ordered alphabetically?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 238, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the characters and duration of actors?", "output": "SELECT Character , Duration FROM actor", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: What are the characters and duration of actors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 239, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the characters and durations for each actor.", "output": "SELECT Character , Duration FROM actor", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Return the characters and durations for each actor.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 240, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of actors whose age is not 20.", "output": "SELECT Name FROM actor WHERE Age != 20", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: List the name of actors whose age is not 20.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 241, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of actors who are not 20 years old?", "output": "SELECT Name FROM actor WHERE Age != 20", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: What are the names of actors who are not 20 years old?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 242, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the characters of actors in descending order of age?", "output": "SELECT Character FROM actor ORDER BY age DESC", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: What are the characters of actors in descending order of age?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 243, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the characters for actors, ordered by age descending.", "output": "SELECT Character FROM actor ORDER BY age DESC", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Return the characters for actors, ordered by age descending.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 244, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the duration of the oldest actor?", "output": "SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: What is the duration of the oldest actor?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 245, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the duration of the actor with the greatest age.", "output": "SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Return the duration of the actor with the greatest age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 246, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of musicals with nominee \"Bob Fosse\"?", "output": "SELECT Name FROM musical WHERE Nominee = \"Bob Fosse\"", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: What are the names of musicals with nominee \"Bob Fosse\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 247, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of musicals who have the nominee Bob Fosse.", "output": "SELECT Name FROM musical WHERE Nominee = \"Bob Fosse\"", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Return the names of musicals who have the nominee Bob Fosse.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 248, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct nominees of the musicals with the award that is not \"Tony Award\"?", "output": "SELECT DISTINCT Nominee FROM musical WHERE Award != \"Tony Award\"", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: What are the distinct nominees of the musicals with the award that is not \"Tony Award\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 249, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the different nominees of musicals that have an award that is not the Tony Award.", "output": "SELECT DISTINCT Nominee FROM musical WHERE Award != \"Tony Award\"", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Return the different nominees of musicals that have an award that is not the Tony Award.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 250, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names of actors and names of musicals they are in.", "output": "SELECT T1.Name , T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Show names of actors and names of musicals they are in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 251, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of actors and the musicals that they are in?", "output": "SELECT T1.Name , T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: What are the names of actors and the musicals that they are in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 252, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names of actors that have appeared in musical with name \"The Phantom of the Opera\".", "output": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = \"The Phantom of the Opera\"", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Show names of actors that have appeared in musical with name \"The Phantom of the Opera\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 253, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of actors who have been in the musical titled The Phantom of the Opera?", "output": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID WHERE T2.Name = \"The Phantom of the Opera\"", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: What are the names of actors who have been in the musical titled The Phantom of the Opera?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 254, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names of actors in descending order of the year their musical is awarded.", "output": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Show names of actors in descending order of the year their musical is awarded.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 255, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of actors ordered descending by the year in which their musical was awarded?", "output": "SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID ORDER BY T2.Year DESC", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: What are the names of actors ordered descending by the year in which their musical was awarded?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 256, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names of musicals and the number of actors who have appeared in the musicals.", "output": "SELECT T2.Name , COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Show names of musicals and the number of actors who have appeared in the musicals.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 257, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many actors have appeared in each musical?", "output": "SELECT T2.Name , COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: How many actors have appeared in each musical?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 258, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names of musicals which have at least three actors.", "output": "SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*) >= 3", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Show names of musicals which have at least three actors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 259, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of musicals who have at 3 or more actors?", "output": "SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*) >= 3", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: What are the names of musicals who have at 3 or more actors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 260, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show different nominees and the number of musicals they have been nominated.", "output": "SELECT Nominee , COUNT(*) FROM musical GROUP BY Nominee", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Show different nominees and the number of musicals they have been nominated.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 261, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many musicals has each nominee been nominated for?", "output": "SELECT Nominee , COUNT(*) FROM musical GROUP BY Nominee", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: How many musicals has each nominee been nominated for?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 262, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the nominee who has been nominated the greatest number of times.", "output": "SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Please show the nominee who has been nominated the greatest number of times.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 263, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the nominee who has been nominated for the most musicals?", "output": "SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Who is the nominee who has been nominated for the most musicals?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 264, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the most common result of the musicals.", "output": "SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: List the most common result of the musicals.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 265, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the most frequent result across all musicals.", "output": "SELECT RESULT FROM musical GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Return the most frequent result across all musicals.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 266, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the nominees that have been nominated more than two musicals.", "output": "SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: List the nominees that have been nominated more than two musicals.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 267, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the nominees who have been nominated more than two times?", "output": "SELECT Nominee FROM musical GROUP BY Nominee HAVING COUNT(*) > 2", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Who are the nominees who have been nominated more than two times?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 268, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of musicals that do not have actors.", "output": "SELECT Name FROM musical WHERE Musical_ID NOT IN (SELECT Musical_ID FROM actor)", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: List the name of musicals that do not have actors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 269, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of musicals who have no actors?", "output": "SELECT Name FROM musical WHERE Musical_ID NOT IN (SELECT Musical_ID FROM actor)", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: What are the names of musicals who have no actors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 270, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the nominees that have nominated musicals for both \"Tony Award\" and \"Drama Desk Award\".", "output": "SELECT Nominee FROM musical WHERE Award = \"Tony Award\" INTERSECT SELECT Nominee FROM musical WHERE Award = \"Drama Desk Award\"", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Show the nominees that have nominated musicals for both \"Tony Award\" and \"Drama Desk Award\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 271, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the nominees who have been nominated for both a Tony Award and a Drama Desk Award?", "output": "SELECT Nominee FROM musical WHERE Award = \"Tony Award\" INTERSECT SELECT Nominee FROM musical WHERE Award = \"Drama Desk Award\"", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Who are the nominees who have been nominated for both a Tony Award and a Drama Desk Award?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 272, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the musical nominee with award \"Bob Fosse\" or \"Cleavant Derricks\".", "output": "SELECT Nominee FROM musical WHERE Award = \"Tony Award\" OR Award = \"Cleavant Derricks\"", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Show the musical nominee with award \"Bob Fosse\" or \"Cleavant Derricks\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "musical", "id": 273, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the nominees who were nominated for either of the Bob Fosse or Cleavant Derricks awards?", "output": "SELECT Nominee FROM musical WHERE Award = \"Tony Award\" OR Award = \"Cleavant Derricks\"", "input": "Based on \n# the table&column(database schema) information {'musical': ['Musical_ID', 'Name', 'Year', 'Award', 'Category', 'Nominee', 'Result'], 'actor': ['Actor_ID', 'Name', 'Musical_ID', 'Character', 'Duration', 'age']} and \n# the user question: Who are the nominees who were nominated for either of the Bob Fosse or Cleavant Derricks awards?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 274, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the emails of the user named \"Mary\".", "output": "SELECT email FROM user_profiles WHERE name = 'Mary'", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the emails of the user named \"Mary\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 275, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the partition id of the user named \"Iron Man\".", "output": "SELECT partitionid FROM user_profiles WHERE name = 'Iron Man'", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: What is the partition id of the user named \"Iron Man\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 276, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many users are there?", "output": "SELECT count(*) FROM user_profiles", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: How many users are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 277, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many followers does each user have?", "output": "SELECT count(*) FROM follows", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: How many followers does each user have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 278, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of followers for each user.", "output": "SELECT count(*) FROM follows GROUP BY f1", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the number of followers for each user.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 279, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of tweets in record.", "output": "SELECT count(*) FROM tweets", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the number of tweets in record.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 280, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of users who posted some tweets.", "output": "SELECT count(DISTINCT UID) FROM tweets", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the number of users who posted some tweets.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 281, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and email of the user whose name contains the word \u2018Swift\u2019.", "output": "SELECT name , email FROM user_profiles WHERE name LIKE '%Swift%'", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the name and email of the user whose name contains the word \u2018Swift\u2019.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 282, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of users whose emails contain \u2018superstar\u2019 or \u2018edu\u2019.", "output": "SELECT name FROM user_profiles WHERE email LIKE '%superstar%' OR email LIKE '%edu%'", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the names of users whose emails contain \u2018superstar\u2019 or \u2018edu\u2019.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 283, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the text of tweets about the topic 'intern'.", "output": "SELECT text FROM tweets WHERE text LIKE '%intern%'", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Return the text of tweets about the topic 'intern'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 284, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and email of the users who have more than 1000 followers.", "output": "SELECT name , email FROM user_profiles WHERE followers > 1000", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the name and email of the users who have more than 1000 followers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 285, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the users whose number of followers is greater than that of the user named \"Tyler Swift\".", "output": "SELECT T1.name FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING count(*) > (SELECT count(*) FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 WHERE T1.name = 'Tyler Swift')", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the names of the users whose number of followers is greater than that of the user named \"Tyler Swift\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 286, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and email for the users who have more than one follower.", "output": "SELECT T1.name , T1.email FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the name and email for the users who have more than one follower.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 287, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of users who have more than one tweet.", "output": "SELECT T1.name FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the names of users who have more than one tweet.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 288, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of users who are followed by Mary and Susan.", "output": "SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = \"Mary\" INTERSECT SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = \"Susan\"", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the id of users who are followed by Mary and Susan.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 289, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of users who are followed by Mary or Susan.", "output": "SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = \"Mary\" OR T1.name = \"Susan\"", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the id of users who are followed by Mary or Susan.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 290, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the user who has the largest number of followers.", "output": "SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the name of the user who has the largest number of followers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 291, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and email of the user followed by the least number of people.", "output": "SELECT name , email FROM user_profiles ORDER BY followers LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the name and email of the user followed by the least number of people.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 292, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name and number of followers for each user, and sort the results by the number of followers in descending order.", "output": "SELECT name , followers FROM user_profiles ORDER BY followers DESC", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: List the name and number of followers for each user, and sort the results by the number of followers in descending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 293, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of 5 users followed by the largest number of other users.", "output": "SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 5", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: List the names of 5 users followed by the largest number of other users.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 294, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the text of all tweets in the order of date.", "output": "SELECT text FROM tweets ORDER BY createdate", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: List the text of all tweets in the order of date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 295, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of each user and number of tweets tweeted by each of them.", "output": "SELECT T1.name , count(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the name of each user and number of tweets tweeted by each of them.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 296, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and partition id for users who tweeted less than twice.", "output": "SELECT T1.name , T1.partitionid FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING count(*) < 2", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the name and partition id for users who tweeted less than twice.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 297, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the user who tweeted more than once, and number of tweets tweeted by them.", "output": "SELECT T1.name , count(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the name of the user who tweeted more than once, and number of tweets tweeted by them.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 298, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average number of followers for the users who do not have any tweet.", "output": "SELECT avg(followers) FROM user_profiles WHERE UID NOT IN (SELECT UID FROM tweets)", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the average number of followers for the users who do not have any tweet.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 299, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average number of followers for the users who had some tweets.", "output": "SELECT avg(followers) FROM user_profiles WHERE UID IN (SELECT UID FROM tweets)", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the average number of followers for the users who had some tweets.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "twitter_1", "id": 300, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the maximum and total number of followers of all users.", "output": "SELECT max(followers) , sum(followers) FROM user_profiles", "input": "Based on \n# the table&column(database schema) information {'follows': ['f1', 'f2'], 'tweets': ['id', 'uid', 'text', 'createdate'], 'user_profiles': ['uid', 'name', 'email', 'partitionid', 'followers']} and \n# the user question: Find the maximum and total number of followers of all users.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 301, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all the catalog entries.", "output": "SELECT distinct(catalog_entry_name) FROM catalog_contents", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all the catalog entries.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 302, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the catalog entry names?", "output": "SELECT distinct(catalog_entry_name) FROM catalog_contents", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the catalog entry names?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 303, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the list of attribute data types possessed by more than 3 attribute definitions.", "output": "SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING count(*) > 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the list of attribute data types possessed by more than 3 attribute definitions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 304, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the attribute data types with more than 3 attribute definitions?", "output": "SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING count(*) > 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the attribute data types with more than 3 attribute definitions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 305, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the attribute data type of the attribute with name \"Green\"?", "output": "SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = \"Green\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the attribute data type of the attribute with name \"Green\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 306, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the attribute data type for the attribute named \"Green\".", "output": "SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = \"Green\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the attribute data type for the attribute named \"Green\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 307, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and level of catalog structure with level between 5 and 10.", "output": "SELECT catalog_level_name , catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and level of catalog structure with level between 5 and 10.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 308, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and level of catalog structure with level number between 5 and 10", "output": "SELECT catalog_level_name , catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name and level of catalog structure with level number between 5 and 10,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 309, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the catalog publishers whose name contains \"Murray\"", "output": "SELECT distinct(catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE \"%Murray%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the catalog publishers whose name contains \"Murray\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 310, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which catalog publishers have substring \"Murray\" in their names?", "output": "SELECT distinct(catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE \"%Murray%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which catalog publishers have substring \"Murray\" in their names?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 311, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which catalog publisher has published the most catalogs?", "output": "SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which catalog publisher has published the most catalogs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 312, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the catalog publisher that has the most catalogs.", "output": "SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the catalog publisher that has the most catalogs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 313, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names and publication dates of all catalogs that have catalog level number greater than 5.", "output": "SELECT t1.catalog_name , t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names and publication dates of all catalogs that have catalog level number greater than 5.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 314, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and publication date of the catalogs with catalog level number above 5?", "output": "SELECT t1.catalog_name , t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name and publication date of the catalogs with catalog level number above 5?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 315, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the entry names of catalog with the attribute possessed by most entries.", "output": "SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.attribute_value = (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY count(*) DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the entry names of catalog with the attribute possessed by most entries.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 316, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the entry names of the catalog with the attribute that have the most entries.", "output": "SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.attribute_value = (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY count(*) DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the entry names of the catalog with the attribute that have the most entries.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 317, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the entry name of the most expensive catalog (in USD)?", "output": "SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the entry name of the most expensive catalog (in USD)?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 318, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the entry name of the catalog with the highest price (in USD).", "output": "SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the entry name of the catalog with the highest price (in USD).,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 319, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the level name of the cheapest catalog (in USD)?", "output": "SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number = t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the level name of the cheapest catalog (in USD)?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 320, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the level name of the catalog with the lowest price (in USD).", "output": "SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number = t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the level name of the catalog with the lowest price (in USD).,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 321, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average and minimum price (in Euro) of all products?", "output": "SELECT avg(price_in_euros) , min(price_in_euros) FROM catalog_contents", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the average and minimum price (in Euro) of all products?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 322, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the average and minimum price (in Euro) of the products.", "output": "SELECT avg(price_in_euros) , min(price_in_euros) FROM catalog_contents", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the average and minimum price (in Euro) of the products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 323, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the product with the highest height? Give me the catalog entry name.", "output": "SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the product with the highest height? Give me the catalog entry name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 324, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which catalog content has the highest height? Give me the catalog entry name.", "output": "SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which catalog content has the highest height? Give me the catalog entry name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 325, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the product that has the smallest capacity.", "output": "SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the product that has the smallest capacity.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 326, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which catalog content has the smallest capacity? Return the catalog entry name.", "output": "SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which catalog content has the smallest capacity? Return the catalog entry name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 327, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all the products whose stock number starts with \"2\".", "output": "SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE \"2%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all the products whose stock number starts with \"2\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 328, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which catalog contents have a product stock number that starts from \"2\"? Show the catalog entry names.", "output": "SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE \"2%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which catalog contents have a product stock number that starts from \"2\"? Show the catalog entry names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 329, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of catalog entries with level number 8.", "output": "SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = \"8\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of catalog entries with level number 8.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 330, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of catalog entries with level number 8?", "output": "SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = \"8\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of catalog entries with level number 8?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 331, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the products with length smaller than 3 or height greater than 5.", "output": "SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the products with length smaller than 3 or height greater than 5.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 332, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which catalog contents have length below 3 or above 5? Find the catalog entry names.", "output": "SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which catalog contents have length below 3 or above 5? Find the catalog entry names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 333, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and attribute ID of the attribute definitions with attribute value 0.", "output": "SELECT t1.attribute_name , t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and attribute ID of the attribute definitions with attribute value 0.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 334, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which attribute definitions have attribute value 0? Give me the attribute name and attribute ID.", "output": "SELECT t1.attribute_name , t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which attribute definitions have attribute value 0? Give me the attribute name and attribute ID.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 335, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and capacity of products with price greater than 700 (in USD).", "output": "SELECT catalog_entry_name , capacity FROM Catalog_Contents WHERE price_in_dollars > 700", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and capacity of products with price greater than 700 (in USD).,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 336, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities.", "output": "SELECT catalog_entry_name , capacity FROM Catalog_Contents WHERE price_in_dollars > 700", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 337, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the dates on which more than one revisions were made.", "output": "SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the dates on which more than one revisions were made.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 338, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "On which days more than one revisions were made on catalogs.", "output": "SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: On which days more than one revisions were made on catalogs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 339, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many products are there in the records?", "output": "SELECT count(*) FROM catalog_contents", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many products are there in the records?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 340, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total number of catalog contents.", "output": "SELECT count(*) FROM catalog_contents", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total number of catalog contents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 341, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Name all the products with next entry ID greater than 8.", "output": "SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 8", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Name all the products with next entry ID greater than 8.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "product_catalog", "id": 342, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the catalog entry names of the products with next entry ID above 8?", "output": "SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id > 8", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the catalog entry names of the products with next entry ID above 8?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 343, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many aircrafts do we have?", "output": "SELECT count(*) FROM Aircraft", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: How many aircrafts do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 344, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many aircrafts exist in the database?", "output": "SELECT count(*) FROM Aircraft", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: How many aircrafts exist in the database?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 345, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show name and distance for all aircrafts.", "output": "SELECT name , distance FROM Aircraft", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show name and distance for all aircrafts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 346, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and distances for all airplanes?", "output": "SELECT name , distance FROM Aircraft", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the names and distances for all airplanes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 347, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show ids for all aircrafts with more than 1000 distance.", "output": "SELECT aid FROM Aircraft WHERE distance > 1000", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show ids for all aircrafts with more than 1000 distance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 348, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all aircrafts that can cover a distance of more than 1000?", "output": "SELECT aid FROM Aircraft WHERE distance > 1000", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the ids of all aircrafts that can cover a distance of more than 1000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 349, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many aircrafts have distance between 1000 and 5000?", "output": "SELECT count(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: How many aircrafts have distance between 1000 and 5000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 350, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the count of aircrafts that have a distance between 1000 and 5000?", "output": "SELECT count(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the count of aircrafts that have a distance between 1000 and 5000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 351, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and distance for aircraft with id 12?", "output": "SELECT name , distance FROM Aircraft WHERE aid = 12", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the name and distance for aircraft with id 12?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 352, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and distance for the aircraft that has an id of 12?", "output": "SELECT name , distance FROM Aircraft WHERE aid = 12", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the name and distance for the aircraft that has an id of 12?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 353, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the minimum, average, and maximum distance of all aircrafts.", "output": "SELECT min(distance) , avg(distance) , max(distance) FROM Aircraft", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the minimum, average, and maximum distance of all aircrafts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 354, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the minimum, average and maximum distances traveled across all aircrafts.", "output": "SELECT min(distance) , avg(distance) , max(distance) FROM Aircraft", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Return the minimum, average and maximum distances traveled across all aircrafts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 355, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the id and name of the aircraft with the maximum distance.", "output": "SELECT aid , name FROM Aircraft ORDER BY distance DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show the id and name of the aircraft with the maximum distance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 356, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id and name of the aircraft that can cover the maximum distance?", "output": "SELECT aid , name FROM Aircraft ORDER BY distance DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the id and name of the aircraft that can cover the maximum distance?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 357, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of aircrafts with top three lowest distances.", "output": "SELECT name FROM Aircraft ORDER BY distance LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show the name of aircrafts with top three lowest distances.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 358, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the aircrafts with top 3 shortest lengthes? List their names.", "output": "SELECT name FROM Aircraft ORDER BY distance LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the aircrafts with top 3 shortest lengthes? List their names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 359, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names for all aircrafts with distances more than the average.", "output": "SELECT name FROM Aircraft WHERE distance > (SELECT avg(distance) FROM Aircraft)", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show names for all aircrafts with distances more than the average.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 360, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all aircrafts that can cover more distances than average?", "output": "SELECT name FROM Aircraft WHERE distance > (SELECT avg(distance) FROM Aircraft)", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the names of all aircrafts that can cover more distances than average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 361, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many employees do we have?", "output": "SELECT count(*) FROM Employee", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: How many employees do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 362, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of employees?", "output": "SELECT count(*) FROM Employee", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the number of employees?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 363, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show name and salary for all employees sorted by salary.", "output": "SELECT name , salary FROM Employee ORDER BY salary", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show name and salary for all employees sorted by salary.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 364, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and salary of all employees in order of salary?", "output": "SELECT name , salary FROM Employee ORDER BY salary", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the name and salary of all employees in order of salary?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 365, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show ids for all employees with at least 100000 salary.", "output": "SELECT eid FROM Employee WHERE salary > 100000", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show ids for all employees with at least 100000 salary.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 366, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of every employee who has at least a salary of 100000?", "output": "SELECT eid FROM Employee WHERE salary > 100000", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the id of every employee who has at least a salary of 100000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 367, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many employees have salary between 100000 and 200000?", "output": "SELECT count(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: How many employees have salary between 100000 and 200000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 368, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of employees that have a salary between 100000 and 200000?", "output": "SELECT count(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the number of employees that have a salary between 100000 and 200000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 369, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and salary for employee with id 242518965?", "output": "SELECT name , salary FROM Employee WHERE eid = 242518965", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the name and salary for employee with id 242518965?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 370, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and salary of the employee with the id 242518965?", "output": "SELECT name , salary FROM Employee WHERE eid = 242518965", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the name and salary of the employee with the id 242518965?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 371, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is average and maximum salary of all employees.", "output": "SELECT avg(salary) , max(salary) FROM Employee", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is average and maximum salary of all employees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 372, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average and largest salary of all employees?", "output": "SELECT avg(salary) , max(salary) FROM Employee", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the average and largest salary of all employees?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 373, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the id and name of the employee with maximum salary.", "output": "SELECT eid , name FROM Employee ORDER BY salary DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show the id and name of the employee with maximum salary.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 374, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id and name of the employee with the highest salary?", "output": "SELECT eid , name FROM Employee ORDER BY salary DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the id and name of the employee with the highest salary?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 375, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of employees with three lowest salaries.", "output": "SELECT name FROM Employee ORDER BY salary ASC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show the name of employees with three lowest salaries.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 376, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the 3 employees who get paid the least?", "output": "SELECT name FROM Employee ORDER BY salary ASC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the name of the 3 employees who get paid the least?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 377, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names for all employees with salary more than the average.", "output": "SELECT name FROM Employee WHERE salary > (SELECT avg(salary) FROM Employee)", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show names for all employees with salary more than the average.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 378, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all employees who have a salary higher than average?", "output": "SELECT name FROM Employee WHERE salary > (SELECT avg(salary) FROM Employee)", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the names of all employees who have a salary higher than average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 379, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the id and salary of Mark Young.", "output": "SELECT eid , salary FROM Employee WHERE name = 'Mark Young'", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show the id and salary of Mark Young.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 380, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id and salary of the employee named Mark Young?", "output": "SELECT eid , salary FROM Employee WHERE name = 'Mark Young'", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the id and salary of the employee named Mark Young?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 381, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many flights do we have?", "output": "SELECT count(*) FROM Flight", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: How many flights do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 382, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of flights?", "output": "SELECT count(*) FROM Flight", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the number of flights?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 383, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show flight number, origin, destination of all flights in the alphabetical order of the departure cities.", "output": "SELECT flno , origin , destination FROM Flight ORDER BY origin", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show flight number, origin, destination of all flights in the alphabetical order of the departure cities.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 384, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the flight number, origin, and destination for all flights in alphabetical order by departure cities?", "output": "SELECT flno , origin , destination FROM Flight ORDER BY origin", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the flight number, origin, and destination for all flights in alphabetical order by departure cities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 385, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all flight number from Los Angeles.", "output": "SELECT flno FROM Flight WHERE origin = \"Los Angeles\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show all flight number from Los Angeles.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 386, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the numbers of all flights coming from Los Angeles?", "output": "SELECT flno FROM Flight WHERE origin = \"Los Angeles\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the numbers of all flights coming from Los Angeles?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 387, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show origins of all flights with destination Honolulu.", "output": "SELECT origin FROM Flight WHERE destination = \"Honolulu\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show origins of all flights with destination Honolulu.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 388, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the origins of all flights that are headed to Honolulu?", "output": "SELECT origin FROM Flight WHERE destination = \"Honolulu\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the origins of all flights that are headed to Honolulu?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 389, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show me the departure date and arrival date for all flights from Los Angeles to Honolulu.", "output": "SELECT departure_date , arrival_date FROM Flight WHERE origin = \"Los Angeles\" AND destination = \"Honolulu\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show me the departure date and arrival date for all flights from Los Angeles to Honolulu.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 390, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the departure and arrival dates of all flights from LA to Honolulu?", "output": "SELECT departure_date , arrival_date FROM Flight WHERE origin = \"Los Angeles\" AND destination = \"Honolulu\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the departure and arrival dates of all flights from LA to Honolulu?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 391, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show flight number for all flights with more than 2000 distance.", "output": "SELECT flno FROM Flight WHERE distance > 2000", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show flight number for all flights with more than 2000 distance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 392, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the numbers of all flights that can cover a distance of more than 2000?", "output": "SELECT flno FROM Flight WHERE distance > 2000", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the numbers of all flights that can cover a distance of more than 2000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 393, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average price for flights from Los Angeles to Honolulu.", "output": "SELECT avg(price) FROM Flight WHERE origin = \"Los Angeles\" AND destination = \"Honolulu\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the average price for flights from Los Angeles to Honolulu.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 394, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average price for flights from LA to Honolulu?", "output": "SELECT avg(price) FROM Flight WHERE origin = \"Los Angeles\" AND destination = \"Honolulu\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the average price for flights from LA to Honolulu?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 395, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show origin and destination for flights with price higher than 300.", "output": "SELECT origin , destination FROM Flight WHERE price > 300", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show origin and destination for flights with price higher than 300.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 396, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the origin and destination for all flights whose price is higher than 300?", "output": "SELECT origin , destination FROM Flight WHERE price > 300", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the origin and destination for all flights whose price is higher than 300?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 397, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the flight number and distance of the flight with maximum price.", "output": "SELECT flno , distance FROM Flight ORDER BY price DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show the flight number and distance of the flight with maximum price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 398, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the flight number and its distance for the one with the maximum price?", "output": "SELECT flno , distance FROM Flight ORDER BY price DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the flight number and its distance for the one with the maximum price?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 399, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the flight number of flights with three lowest distances.", "output": "SELECT flno FROM Flight ORDER BY distance ASC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show the flight number of flights with three lowest distances.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 400, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the numbers of the shortest flights?", "output": "SELECT flno FROM Flight ORDER BY distance ASC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the numbers of the shortest flights?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 401, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average distance and average price for flights from Los Angeles.", "output": "SELECT avg(distance) , avg(price) FROM Flight WHERE origin = \"Los Angeles\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the average distance and average price for flights from Los Angeles.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 402, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average distance and price for all flights from LA?", "output": "SELECT avg(distance) , avg(price) FROM Flight WHERE origin = \"Los Angeles\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the average distance and price for all flights from LA?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 403, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all origins and the number of flights from each origin.", "output": "SELECT origin , count(*) FROM Flight GROUP BY origin", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show all origins and the number of flights from each origin.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 404, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each origin, how many flights came from there?", "output": "SELECT origin , count(*) FROM Flight GROUP BY origin", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: For each origin, how many flights came from there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 405, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all destinations and the number of flights to each destination.", "output": "SELECT destination , count(*) FROM Flight GROUP BY destination", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show all destinations and the number of flights to each destination.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 406, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the destinations and number of flights to each one?", "output": "SELECT destination , count(*) FROM Flight GROUP BY destination", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the destinations and number of flights to each one?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 407, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which origin has most number of flights?", "output": "SELECT origin FROM Flight GROUP BY origin ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Which origin has most number of flights?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 408, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What place has the most flights coming from there?", "output": "SELECT origin FROM Flight GROUP BY origin ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What place has the most flights coming from there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 409, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which destination has least number of flights?", "output": "SELECT destination FROM Flight GROUP BY destination ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Which destination has least number of flights?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 410, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What destination has the fewest number of flights?", "output": "SELECT destination FROM Flight GROUP BY destination ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What destination has the fewest number of flights?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 411, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the aircraft name for the flight with number 99", "output": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the aircraft name for the flight with number 99,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 412, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the aircraft that was on flight number 99?", "output": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno = 99", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the name of the aircraft that was on flight number 99?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 413, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all flight numbers with aircraft Airbus A340-300.", "output": "SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = \"Airbus A340-300\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show all flight numbers with aircraft Airbus A340-300.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 414, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the flight numbers for the aircraft Airbus A340-300?", "output": "SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = \"Airbus A340-300\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the flight numbers for the aircraft Airbus A340-300?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 415, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show aircraft names and number of flights for each aircraft.", "output": "SELECT T2.name , count(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show aircraft names and number of flights for each aircraft.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 416, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of each aircraft and how many flights does each one complete?", "output": "SELECT T2.name , count(*) FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the name of each aircraft and how many flights does each one complete?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 417, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names for all aircraft with at least two flights.", "output": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show names for all aircraft with at least two flights.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 418, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names for all aircrafts with at least 2 flights?", "output": "SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the names for all aircrafts with at least 2 flights?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 419, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many employees have certificate.", "output": "SELECT count(DISTINCT eid) FROM Certificate", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: How many employees have certificate.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 420, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the count of distinct employees with certificates?", "output": "SELECT count(DISTINCT eid) FROM Certificate", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the count of distinct employees with certificates?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 421, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show ids for all employees who don't have a certificate.", "output": "SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show ids for all employees who don't have a certificate.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 422, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all employees that don't have certificates?", "output": "SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the ids of all employees that don't have certificates?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 423, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names for all aircrafts of which John Williams has certificates.", "output": "SELECT T3.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T1.name = \"John Williams\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show names for all aircrafts of which John Williams has certificates.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 424, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all aircrafts that John Williams have certificates to be able to fly?", "output": "SELECT T3.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T1.name = \"John Williams\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the names of all aircrafts that John Williams have certificates to be able to fly?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 425, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names for all employees who have certificate of Boeing 737-800.", "output": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = \"Boeing 737-800\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show names for all employees who have certificate of Boeing 737-800.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 426, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all employees who have a certificate to fly Boeing 737-800?", "output": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = \"Boeing 737-800\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the names of all employees who have a certificate to fly Boeing 737-800?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 427, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names for all employees who have certificates on both Boeing 737-800 and Airbus A340-300.", "output": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = \"Boeing 737-800\" INTERSECT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = \"Airbus A340-300\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show names for all employees who have certificates on both Boeing 737-800 and Airbus A340-300.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 428, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all employees who can fly both the Boeing 737-800 and the Airbus A340-300?", "output": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = \"Boeing 737-800\" INTERSECT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = \"Airbus A340-300\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the names of all employees who can fly both the Boeing 737-800 and the Airbus A340-300?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 429, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names for all employees who do not have certificate of Boeing 737-800.", "output": "SELECT name FROM Employee EXCEPT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = \"Boeing 737-800\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show names for all employees who do not have certificate of Boeing 737-800.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 430, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all employees who are not certified to fly Boeing 737-800s?", "output": "SELECT name FROM Employee EXCEPT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.name = \"Boeing 737-800\"", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the names of all employees who are not certified to fly Boeing 737-800s?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 431, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of aircraft which fewest people have its certificate.", "output": "SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid GROUP BY T1.aid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show the name of aircraft which fewest people have its certificate.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 432, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the aircraft that the least people are certified to fly?", "output": "SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid GROUP BY T1.aid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What are the names of the aircraft that the least people are certified to fly?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 433, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have its certificate.", "output": "SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid WHERE T2.distance > 5000 GROUP BY T1.aid ORDER BY count(*) >= 5", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: Show the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have its certificate.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 434, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid = T1.aid WHERE T2.distance > 5000 GROUP BY T1.aid ORDER BY count(*) >= 5", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 435, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what is the salary and name of the employee who has the most number of aircraft certificates?", "output": "SELECT T1.name , T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: what is the salary and name of the employee who has the most number of aircraft certificates?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 436, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the salaray and name of the employee that is certified to fly the most planes?", "output": "SELECT T1.name , T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the salaray and name of the employee that is certified to fly the most planes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 437, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the salary and name of the employee who has the most number of certificates on aircrafts with distance more than 5000?", "output": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.distance > 5000 GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the salary and name of the employee who has the most number of certificates on aircrafts with distance more than 5000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_1", "id": 438, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the salaray and name of the employee with the most certificates to fly planes more than 5000?", "output": "SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.distance > 5000 GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'flight': ['flno', 'origin', 'destination', 'distance', 'departure_date', 'arrival_date', 'price', 'aid'], 'aircraft': ['aid', 'name', 'distance'], 'employee': ['eid', 'name', 'salary'], 'certificate': ['eid', 'aid']} and \n# the user question: What is the salaray and name of the employee with the most certificates to fly planes more than 5000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 439, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many allergies are there?", "output": "SELECT count(DISTINCT allergy) FROM Allergy_type", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many allergies are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 440, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many allergy entries are there?", "output": "SELECT count(DISTINCT allergy) FROM Allergy_type", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many allergy entries are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 441, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different allergy types exist?", "output": "SELECT count(DISTINCT allergytype) FROM Allergy_type", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many different allergy types exist?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 442, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct allergies are there?", "output": "SELECT count(DISTINCT allergytype) FROM Allergy_type", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many distinct allergies are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 443, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all allergy types.", "output": "SELECT DISTINCT allergytype FROM Allergy_type", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show all allergy types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 444, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different allergy types?", "output": "SELECT DISTINCT allergytype FROM Allergy_type", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are the different allergy types?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 445, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all allergies and their types.", "output": "SELECT allergy , allergytype FROM Allergy_type", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show all allergies and their types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 446, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the allergies and their types?", "output": "SELECT allergy , allergytype FROM Allergy_type", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are the allergies and their types?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 447, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all allergies with type food.", "output": "SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = \"food\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show all allergies with type food.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 448, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the different food allergies?", "output": "SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype = \"food\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are all the different food allergies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 449, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the type of allergy Cat?", "output": "SELECT allergytype FROM Allergy_type WHERE allergy = \"Cat\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What is the type of allergy Cat?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 450, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is allergy type of a cat allergy?", "output": "SELECT allergytype FROM Allergy_type WHERE allergy = \"Cat\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What is allergy type of a cat allergy?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 451, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many allergies have type animal?", "output": "SELECT count(*) FROM Allergy_type WHERE allergytype = \"animal\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many allergies have type animal?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 452, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many animal type allergies exist?", "output": "SELECT count(*) FROM Allergy_type WHERE allergytype = \"animal\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many animal type allergies exist?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 453, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all allergy types and the number of allergies in each type.", "output": "SELECT allergytype , count(*) FROM Allergy_type GROUP BY allergytype", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show all allergy types and the number of allergies in each type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 454, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the allergy types and how many allergies correspond to each one?", "output": "SELECT allergytype , count(*) FROM Allergy_type GROUP BY allergytype", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are the allergy types and how many allergies correspond to each one?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 455, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which allergy type has most number of allergies?", "output": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Which allergy type has most number of allergies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 456, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which allergy type is most common?", "output": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Which allergy type is most common?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 457, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which allergy type has least number of allergies?", "output": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Which allergy type has least number of allergies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 458, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which allergy type is the least common?", "output": "SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Which allergy type is the least common?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 459, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are there?", "output": "SELECT count(*) FROM Student", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many students are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 460, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of students?", "output": "SELECT count(*) FROM Student", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What is the total number of students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 461, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show first name and last name for all students.", "output": "SELECT Fname , Lname FROM Student", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show first name and last name for all students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 462, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names of all students", "output": "SELECT Fname , Lname FROM Student", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are the full names of all students,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 463, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different advisors are listed?", "output": "SELECT count(DISTINCT advisor) FROM Student", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many different advisors are listed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 464, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many advisors are there?", "output": "SELECT count(DISTINCT advisor) FROM Student", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many advisors are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 465, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all majors.", "output": "SELECT DISTINCT Major FROM Student", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show all majors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 466, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different majors?", "output": "SELECT DISTINCT Major FROM Student", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are the different majors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 467, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all cities where students live.", "output": "SELECT DISTINCT city_code FROM Student", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show all cities where students live.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 468, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What cities do students live in?", "output": "SELECT DISTINCT city_code FROM Student", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What cities do students live in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 469, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show first name, last name, age for all female students. Their sex is F.", "output": "SELECT Fname , Lname , Age FROM Student WHERE Sex = 'F'", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show first name, last name, age for all female students. Their sex is F.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 470, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names and ages for all female students whose sex is F?", "output": "SELECT Fname , Lname , Age FROM Student WHERE Sex = 'F'", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are the full names and ages for all female students whose sex is F?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 471, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show student ids for all male students.", "output": "SELECT StuID FROM Student WHERE Sex = 'M'", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show student ids for all male students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 472, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the student ids for all male students?", "output": "SELECT StuID FROM Student WHERE Sex = 'M'", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are the student ids for all male students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 473, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are age 18?", "output": "SELECT count(*) FROM Student WHERE age = 18", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many students are age 18?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 474, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are 18 years old?", "output": "SELECT count(*) FROM Student WHERE age = 18", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many students are 18 years old?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 475, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all student ids who are older than 20.", "output": "SELECT StuID FROM Student WHERE age > 20", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show all student ids who are older than 20.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 476, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the student ids for students over 20 years old?", "output": "SELECT StuID FROM Student WHERE age > 20", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are the student ids for students over 20 years old?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 477, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which city does the student whose last name is \"Kim\" live in?", "output": "SELECT city_code FROM Student WHERE LName = \"Kim\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Which city does the student whose last name is \"Kim\" live in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 478, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the city that the student whose family name is Kim lives in.", "output": "SELECT city_code FROM Student WHERE LName = \"Kim\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Give the city that the student whose family name is Kim lives in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 479, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the advisor of student with ID 1004?", "output": "SELECT Advisor FROM Student WHERE StuID = 1004", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Who is the advisor of student with ID 1004?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 480, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who advises student 1004?", "output": "SELECT Advisor FROM Student WHERE StuID = 1004", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Who advises student 1004?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 481, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students live in HKG or CHI?", "output": "SELECT count(*) FROM Student WHERE city_code = \"HKG\" OR city_code = \"CHI\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many students live in HKG or CHI?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 482, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the number of students living in either HKG or CHI.", "output": "SELECT count(*) FROM Student WHERE city_code = \"HKG\" OR city_code = \"CHI\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Give the number of students living in either HKG or CHI.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 483, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the minimum, average, and maximum age of all students.", "output": "SELECT min(age) , avg(age) , max(age) FROM Student", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show the minimum, average, and maximum age of all students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 484, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the minimum, mean, and maximum age across all students?", "output": "SELECT min(age) , avg(age) , max(age) FROM Student", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What is the minimum, mean, and maximum age across all students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 485, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last name of the youngest student?", "output": "SELECT LName FROM Student WHERE age = (SELECT min(age) FROM Student)", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What is the last name of the youngest student?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 486, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Provide the last name of the youngest student.", "output": "SELECT LName FROM Student WHERE age = (SELECT min(age) FROM Student)", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Provide the last name of the youngest student.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 487, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the student id of the oldest student.", "output": "SELECT StuID FROM Student WHERE age = (SELECT max(age) FROM Student)", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show the student id of the oldest student.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 488, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What student id corresponds to the oldest student?", "output": "SELECT StuID FROM Student WHERE age = (SELECT max(age) FROM Student)", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What student id corresponds to the oldest student?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 489, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all majors and corresponding number of students.", "output": "SELECT major , count(*) FROM Student GROUP BY major", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show all majors and corresponding number of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 490, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are there for each major?", "output": "SELECT major , count(*) FROM Student GROUP BY major", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many students are there for each major?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 491, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which major has most number of students?", "output": "SELECT major FROM Student GROUP BY major ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Which major has most number of students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 492, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the largest major?", "output": "SELECT major FROM Student GROUP BY major ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What is the largest major?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 493, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all ages and corresponding number of students.", "output": "SELECT age , count(*) FROM Student GROUP BY age", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show all ages and corresponding number of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 494, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How old is each student and how many students are each age?", "output": "SELECT age , count(*) FROM Student GROUP BY age", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How old is each student and how many students are each age?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 495, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average age for male and female students.", "output": "SELECT avg(age) , sex FROM Student GROUP BY sex", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show the average age for male and female students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 496, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average ages for male and female students?", "output": "SELECT avg(age) , sex FROM Student GROUP BY sex", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are the average ages for male and female students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 497, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all cities and corresponding number of students.", "output": "SELECT city_code , count(*) FROM Student GROUP BY city_code", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show all cities and corresponding number of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 498, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students live in each city?", "output": "SELECT city_code , count(*) FROM Student GROUP BY city_code", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many students live in each city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 499, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all advisors and corresponding number of students.", "output": "SELECT advisor , count(*) FROM Student GROUP BY advisor", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show all advisors and corresponding number of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 500, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students does each advisor have?", "output": "SELECT advisor , count(*) FROM Student GROUP BY advisor", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many students does each advisor have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 501, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which advisor has most number of students?", "output": "SELECT advisor FROM Student GROUP BY advisor ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Which advisor has most number of students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 502, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the advisor with the most students.", "output": "SELECT advisor FROM Student GROUP BY advisor ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Give the advisor with the most students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 503, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students have cat allergies?", "output": "SELECT count(*) FROM Has_allergy WHERE Allergy = \"Cat\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many students have cat allergies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 504, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are affected by cat allergies?", "output": "SELECT count(*) FROM Has_allergy WHERE Allergy = \"Cat\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many students are affected by cat allergies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 505, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all student IDs who have at least two allergies.", "output": "SELECT StuID FROM Has_allergy GROUP BY StuID HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show all student IDs who have at least two allergies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 506, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the students ids of students who have more than one allergy?", "output": "SELECT StuID FROM Has_allergy GROUP BY StuID HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are the students ids of students who have more than one allergy?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 507, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the student ids of students who don't have any allergies?", "output": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are the student ids of students who don't have any allergies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 508, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which students are unaffected by allergies?", "output": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Which students are unaffected by allergies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 509, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many female students have milk or egg allergies?", "output": "SELECT count(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = \"F\" AND T1.allergy = \"Milk\" OR T1.allergy = \"Eggs\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many female students have milk or egg allergies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 510, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students who are female are allergic to milk or eggs?", "output": "SELECT count(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = \"F\" AND T1.allergy = \"Milk\" OR T1.allergy = \"Eggs\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many students who are female are allergic to milk or eggs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 511, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students have a food allergy?", "output": "SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = \"food\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many students have a food allergy?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 512, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are affected by food related allergies?", "output": "SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = \"food\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many students are affected by food related allergies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 513, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which allergy has most number of students affected?", "output": "SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Which allergy has most number of students affected?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 514, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which allergy is the most common?", "output": "SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Which allergy is the most common?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 515, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all allergies with number of students affected.", "output": "SELECT Allergy , count(*) FROM Has_allergy GROUP BY Allergy", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show all allergies with number of students affected.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 516, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students have each different allergy?", "output": "SELECT Allergy , count(*) FROM Has_allergy GROUP BY Allergy", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many students have each different allergy?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 517, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all allergy type with number of students affected.", "output": "SELECT T2.allergytype , count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Show all allergy type with number of students affected.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 518, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are affected by each allergy type?", "output": "SELECT T2.allergytype , count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many students are affected by each allergy type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 519, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last name and age of the student who has allergy to both milk and cat.", "output": "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\")", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Find the last name and age of the student who has allergy to both milk and cat.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 520, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the last names and ages of the students who are allergic to milk and cat?", "output": "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\")", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are the last names and ages of the students who are allergic to milk and cat?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 521, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the allergies and their types that the student with first name Lisa has? And order the result by name of allergies.", "output": "SELECT T1.Allergy , T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = \"Lisa\" ORDER BY T1.Allergy", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are the allergies and their types that the student with first name Lisa has? And order the result by name of allergies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 522, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the allergies the girl named Lisa has? And what are the types of them? Order the result by allergy names.", "output": "SELECT T1.Allergy , T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = \"Lisa\" ORDER BY T1.Allergy", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are the allergies the girl named Lisa has? And what are the types of them? Order the result by allergy names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 523, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name and gender of the student who has allergy to milk but not cat.", "output": "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\")", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Find the first name and gender of the student who has allergy to milk but not cat.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 524, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first name and gender of the students who have allergy to milk but can put up with cats?", "output": "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\")", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are the first name and gender of the students who have allergy to milk but can put up with cats?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 525, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average age of the students who have allergies with food and animal types.", "output": "SELECT avg(age) FROM Student WHERE StuID IN ( SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\" INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"animal\")", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Find the average age of the students who have allergies with food and animal types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 526, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How old are the students with allergies to food and animal types on average?", "output": "SELECT avg(age) FROM Student WHERE StuID IN ( SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\" INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"animal\")", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How old are the students with allergies to food and animal types on average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 527, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the first and last name of the students who do not have any food type allergy.", "output": "SELECT fname , lname FROM Student WHERE StuID NOT IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\")", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: List the first and last name of the students who do not have any food type allergy.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 528, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the full name of each student who is not allergic to any type of food.", "output": "SELECT fname , lname FROM Student WHERE StuID NOT IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\")", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What is the full name of each student who is not allergic to any type of food.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 529, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of male (sex is 'M') students who have some food type allery.", "output": "SELECT count(*) FROM Student WHERE sex = \"M\" AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\")", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Find the number of male (sex is 'M') students who have some food type allery.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 530, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many male students (sex is 'M') are allergic to any type of food?", "output": "SELECT count(*) FROM Student WHERE sex = \"M\" AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\")", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many male students (sex is 'M') are allergic to any type of food?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 531, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the different first names and cities of the students who have allergy to milk or cat.", "output": "SELECT DISTINCT T1.fname , T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = \"Milk\" OR T2.Allergy = \"Cat\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Find the different first names and cities of the students who have allergy to milk or cat.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 532, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct first names and cities of the students who have allergy either to milk or to cat?", "output": "SELECT DISTINCT T1.fname , T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = \"Milk\" OR T2.Allergy = \"Cat\"", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are the distinct first names and cities of the students who have allergy either to milk or to cat?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 533, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of students who are older than 18 and do not have allergy to either food or animal.", "output": "SELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\" OR T2.allergytype = \"animal\")", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Find the number of students who are older than 18 and do not have allergy to either food or animal.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 534, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are over 18 and do not have allergy to food type or animal type?", "output": "SELECT count(*) FROM Student WHERE age > 18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = \"food\" OR T2.allergytype = \"animal\")", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: How many students are over 18 and do not have allergy to food type or animal type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 535, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name and major of the students who are not allegry to soy.", "output": "SELECT fname , major FROM Student WHERE StuID NOT IN (SELECT StuID FROM Has_allergy WHERE Allergy = \"Soy\")", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: Find the first name and major of the students who are not allegry to soy.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "allergy_1", "id": 536, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first name and major of the students who are able to consume soy?", "output": "SELECT fname , major FROM Student WHERE StuID NOT IN (SELECT StuID FROM Has_allergy WHERE Allergy = \"Soy\")", "input": "Based on \n# the table&column(database schema) information {'Allergy_Type': ['Allergy', 'AllergyType'], 'Has_Allergy': ['StuID', 'Allergy'], 'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code']} and \n# the user question: What are the first name and major of the students who are able to consume soy?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 537, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "A list of the top 5 countries by number of invoices. List country name and number of invoices.", "output": "SELECT billing_country , COUNT(*) FROM invoices GROUP BY billing_country ORDER BY count(*) DESC LIMIT 5;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: A list of the top 5 countries by number of invoices. List country name and number of invoices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 538, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the top 5 countries by number of invoices and how many do they have?", "output": "SELECT billing_country , COUNT(*) FROM invoices GROUP BY billing_country ORDER BY count(*) DESC LIMIT 5;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the top 5 countries by number of invoices and how many do they have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 539, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "A list of the top 8 countries by gross/total invoice size. List country name and gross invoice size.", "output": "SELECT billing_country , SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: A list of the top 8 countries by gross/total invoice size. List country name and gross invoice size.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 540, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the top 8 countries by total invoice size and what are those sizes?", "output": "SELECT billing_country , SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the top 8 countries by total invoice size and what are those sizes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 541, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "A list of the top 10 countries by average invoice size. List country name and average invoice size.", "output": "SELECT billing_country , AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: A list of the top 10 countries by average invoice size. List country name and average invoice size.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 542, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the countries and average invoice size of the top countries by size?", "output": "SELECT billing_country , AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the countries and average invoice size of the top countries by size?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 543, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find out 5 customers who most recently purchased something. List customers' first and last name.", "output": "SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC LIMIT 5;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find out 5 customers who most recently purchased something. List customers' first and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 544, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of the 5 customers who purchased something most recently?", "output": "SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC LIMIT 5;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last names of the 5 customers who purchased something most recently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 545, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find out the top 10 customers by total number of orders. List customers' first and last name and the number of total orders.", "output": "SELECT T1.first_name , T1.last_name , COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 10;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find out the top 10 customers by total number of orders. List customers' first and last name and the number of total orders.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 546, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the top 10 customers' first and last names by total number of orders and how many orders did they make?", "output": "SELECT T1.first_name , T1.last_name , COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 10;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the top 10 customers' first and last names by total number of orders and how many orders did they make?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 547, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the top 10 customers by total gross sales. List customers' first and last name and total gross sales.", "output": "SELECT T1.first_name , T1.last_name , SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 10;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the top 10 customers by total gross sales. List customers' first and last name and total gross sales.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 548, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the top 10 customers' first and last names with the highest gross sales, and also what are the sales?", "output": "SELECT T1.first_name , T1.last_name , SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 10;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the top 10 customers' first and last names with the highest gross sales, and also what are the sales?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 549, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the top 5 genres by number of tracks. List genres name and total tracks.", "output": "SELECT T1.name , COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 5;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the top 5 genres by number of tracks. List genres name and total tracks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 550, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many tracks does each genre have and what are the names of the top 5?", "output": "SELECT T1.name , COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 5;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many tracks does each genre have and what are the names of the top 5?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 551, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List every album's title.", "output": "SELECT title FROM albums;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List every album's title.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 552, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of all the albums?", "output": "SELECT title FROM albums;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the titles of all the albums?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 553, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List every album ordered by album title in ascending order.", "output": "SELECT title FROM albums ORDER BY title;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List every album ordered by album title in ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 554, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of all the albums alphabetically ascending?", "output": "SELECT title FROM albums ORDER BY title;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the titles of all the albums alphabetically ascending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 555, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List every album whose title starts with A in alphabetical order.", "output": "SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List every album whose title starts with A in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 556, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of all albums that start with A in alphabetical order?", "output": "SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the titles of all albums that start with A in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 557, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the customers first and last name of 10 least expensive invoices.", "output": "SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total LIMIT 10;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the customers first and last name of 10 least expensive invoices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 558, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of the customers with the 10 cheapest invoices?", "output": "SELECT T1.first_name , T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total LIMIT 10;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last names of the customers with the 10 cheapest invoices?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 559, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List total amount of invoice from Chicago, IL.", "output": "SELECT sum(total) FROM invoices WHERE billing_city = \"Chicago\" AND billing_state = \"IL\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List total amount of invoice from Chicago, IL.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 560, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the total amount of money in the invoices billed from Chicago, Illinois?", "output": "SELECT sum(total) FROM invoices WHERE billing_city = \"Chicago\" AND billing_state = \"IL\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the total amount of money in the invoices billed from Chicago, Illinois?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 561, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the number of invoices from Chicago, IL.", "output": "SELECT COUNT(*) FROM invoices WHERE billing_city = \"Chicago\" AND billing_state = \"IL\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the number of invoices from Chicago, IL.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 562, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many invoices were billed from Chicago, IL?", "output": "SELECT COUNT(*) FROM invoices WHERE billing_city = \"Chicago\" AND billing_state = \"IL\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many invoices were billed from Chicago, IL?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 563, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the number of invoices from the US, grouped by state.", "output": "SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = \"USA\" GROUP BY billing_state;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the number of invoices from the US, grouped by state.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 564, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many invoices were billed from each state?", "output": "SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = \"USA\" GROUP BY billing_state;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many invoices were billed from each state?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 565, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the state in the US with the most invoices.", "output": "SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = \"USA\" GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the state in the US with the most invoices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 566, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the states with the most invoices?", "output": "SELECT billing_state , COUNT(*) FROM invoices WHERE billing_country = \"USA\" GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the states with the most invoices?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 567, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the number of invoices and the invoice total from California.", "output": "SELECT billing_state , COUNT(*) , SUM(total) FROM invoices WHERE billing_state = \"CA\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the number of invoices and the invoice total from California.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 568, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of invoices and total money billed in them from CA?", "output": "SELECT billing_state , COUNT(*) , SUM(total) FROM invoices WHERE billing_state = \"CA\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of invoices and total money billed in them from CA?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 569, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List Aerosmith's albums.", "output": "SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = \"Aerosmith\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List Aerosmith's albums.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 570, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of all the Aerosmith albums?", "output": "SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = \"Aerosmith\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the titles of all the Aerosmith albums?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 571, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many albums does Billy Cobham has?", "output": "SELECT count(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = \"Billy Cobham\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many albums does Billy Cobham has?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 572, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many albums has Billy Cobam released?", "output": "SELECT count(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = \"Billy Cobham\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many albums has Billy Cobam released?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 573, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Eduardo Martins is a customer at which company?", "output": "SELECT company FROM customers WHERE first_name = \"Eduardo\" AND last_name = \"Martins\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Eduardo Martins is a customer at which company?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 574, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the company where Eduardo Martins is a customer?", "output": "SELECT company FROM customers WHERE first_name = \"Eduardo\" AND last_name = \"Martins\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the company where Eduardo Martins is a customer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 575, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is Astrid Gruber's email and phone number?", "output": "SELECT email , phone FROM customers WHERE first_name = \"Astrid\" AND last_name = \"Gruber\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is Astrid Gruber's email and phone number?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 576, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the email and phone number of Astrid Gruber the customer?", "output": "SELECT email , phone FROM customers WHERE first_name = \"Astrid\" AND last_name = \"Gruber\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the email and phone number of Astrid Gruber the customer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 577, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers live in Prague city?", "output": "SELECT count(*) FROM customers WHERE city = \"Prague\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers live in Prague city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 578, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers live in the city of Prague?", "output": "SELECT count(*) FROM customers WHERE city = \"Prague\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers live in the city of Prague?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 579, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers in state of CA?", "output": "SELECT count(*) FROM customers WHERE state = \"CA\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers in state of CA?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 580, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers are from California?", "output": "SELECT count(*) FROM customers WHERE state = \"CA\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers are from California?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 581, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What country does Roberto Almeida live?", "output": "SELECT country FROM customers WHERE first_name = \"Roberto\" AND last_name = \"Almeida\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What country does Roberto Almeida live?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 582, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In which country does Roberto Almeida?", "output": "SELECT country FROM customers WHERE first_name = \"Roberto\" AND last_name = \"Almeida\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: In which country does Roberto Almeida?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 583, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of albums that are released by aritist whose name has 'Led'", "output": "SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '%Led%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of albums that are released by aritist whose name has 'Led',\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 584, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the title of the album that was released by the artist whose name has the phrase 'Led'?", "output": "SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '%Led%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the title of the album that was released by the artist whose name has the phrase 'Led'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 585, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers does Steve Johnson support?", "output": "SELECT count(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = \"Steve\" AND T1.last_name = \"Johnson\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers does Steve Johnson support?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 586, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the count of customers that Steve Johnson supports?", "output": "SELECT count(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = \"Steve\" AND T1.last_name = \"Johnson\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the count of customers that Steve Johnson supports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 587, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the title, phone and hire date of Nancy Edwards?", "output": "SELECT title , phone , hire_date FROM employees WHERE first_name = \"Nancy\" AND last_name = \"Edwards\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the title, phone and hire date of Nancy Edwards?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 588, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the title, phone number and hire date for the employee named Nancy Edwards?", "output": "SELECT title , phone , hire_date FROM employees WHERE first_name = \"Nancy\" AND last_name = \"Edwards\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the title, phone number and hire date for the employee named Nancy Edwards?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 589, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the full name of employees who report to Nancy Edwards?", "output": "SELECT T2.first_name , T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = \"Nancy\" AND T1.last_name = \"Edwards\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: find the full name of employees who report to Nancy Edwards?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 590, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first and last name of the employee who reports to Nancy Edwards?", "output": "SELECT T2.first_name , T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = \"Nancy\" AND T1.last_name = \"Edwards\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first and last name of the employee who reports to Nancy Edwards?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 591, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the address of employee Nancy Edwards?", "output": "SELECT address FROM employees WHERE first_name = \"Nancy\" AND last_name = \"Edwards\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the address of employee Nancy Edwards?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 592, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is Nancy Edwards's address?", "output": "SELECT address FROM employees WHERE first_name = \"Nancy\" AND last_name = \"Edwards\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is Nancy Edwards's address?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 593, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the full name of employee who supported the most number of customers.", "output": "SELECT T1.first_name , T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the full name of employee who supported the most number of customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 594, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the full name of the employee who has the most customers?", "output": "SELECT T1.first_name , T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the full name of the employee who has the most customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 595, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many employees are living in Canada?", "output": "SELECT count(*) FROM employees WHERE country = \"Canada\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many employees are living in Canada?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 596, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many employees live in Canada?", "output": "SELECT count(*) FROM employees WHERE country = \"Canada\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many employees live in Canada?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 597, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is employee Nancy Edwards's phone number?", "output": "SELECT phone FROM employees WHERE first_name = \"Nancy\" AND last_name = \"Edwards\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is employee Nancy Edwards's phone number?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 598, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the the phone number of Nancy Edwards?", "output": "SELECT phone FROM employees WHERE first_name = \"Nancy\" AND last_name = \"Edwards\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the the phone number of Nancy Edwards?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 599, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the youngest employee in the company? List employee's first and last name.", "output": "SELECT first_name , last_name FROM employees ORDER BY birth_date DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who is the youngest employee in the company? List employee's first and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 600, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What si the youngest employee's first and last name?", "output": "SELECT first_name , last_name FROM employees ORDER BY birth_date DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What si the youngest employee's first and last name?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 601, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List top 10 employee work longest in the company. List employee's first and last name.", "output": "SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List top 10 employee work longest in the company. List employee's first and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 602, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of the top 10 longest-serving employees?", "output": "SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last names of the top 10 longest-serving employees?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 603, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of employees whose title is IT Staff from each city?", "output": "SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of employees whose title is IT Staff from each city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 604, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many employees who are IT staff are from each city?", "output": "SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many employees who are IT staff are from each city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 605, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.", "output": "SELECT T2.first_name , T2.last_name , count(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY count(T1.reports_to) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 606, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of all the employees and how many people report to them?", "output": "SELECT T2.first_name , T2.last_name , count(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY count(T1.reports_to) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last names of all the employees and how many people report to them?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 607, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many orders does Lucas Mancini has?", "output": "SELECT count(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = \"Lucas\" AND T1.last_name = \"Mancini\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many orders does Lucas Mancini has?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 608, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many orders does Luca Mancini have in his invoices?", "output": "SELECT count(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = \"Lucas\" AND T1.last_name = \"Mancini\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many orders does Luca Mancini have in his invoices?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 609, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total amount of money spent by Lucas Mancini?", "output": "SELECT sum(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = \"Lucas\" AND T1.last_name = \"Mancini\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total amount of money spent by Lucas Mancini?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 610, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How much money did Lucas Mancini spend?", "output": "SELECT sum(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = \"Lucas\" AND T1.last_name = \"Mancini\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How much money did Lucas Mancini spend?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 611, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all media types.", "output": "SELECT name FROM media_types;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all media types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 612, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the media types?", "output": "SELECT name FROM media_types;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the media types?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 613, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all different genre types.", "output": "SELECT DISTINCT name FROM genres;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all different genre types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 614, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different names of the genres?", "output": "SELECT DISTINCT name FROM genres;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different names of the genres?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 615, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of all playlist.", "output": "SELECT name FROM playlists;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of all playlist.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 616, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the playlists?", "output": "SELECT name FROM playlists;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the playlists?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 617, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the composer of track Fast As a Shark?", "output": "SELECT composer FROM tracks WHERE name = \"Fast As a Shark\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who is the composer of track Fast As a Shark?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 618, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the composer who created the track \"Fast As a Shark\"?", "output": "SELECT composer FROM tracks WHERE name = \"Fast As a Shark\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the composer who created the track \"Fast As a Shark\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 619, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How long does track Fast As a Shark has?", "output": "SELECT milliseconds FROM tracks WHERE name = \"Fast As a Shark\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How long does track Fast As a Shark has?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 620, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many milliseconds long is Fast As a Shark?", "output": "SELECT milliseconds FROM tracks WHERE name = \"Fast As a Shark\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many milliseconds long is Fast As a Shark?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 621, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of tracks whose genre is Rock?", "output": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = \"Rock\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of tracks whose genre is Rock?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 622, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of all tracks in the Rock genre?", "output": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = \"Rock\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of all tracks in the Rock genre?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 623, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is title of album which track Balls to the Wall belongs to?", "output": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = \"Balls to the Wall\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is title of album which track Balls to the Wall belongs to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 624, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the album that has the track Ball to the Wall?", "output": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = \"Balls to the Wall\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the album that has the track Ball to the Wall?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 625, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List name of all tracks in Balls to the Wall.", "output": "SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = \"Balls to the Wall\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List name of all tracks in Balls to the Wall.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 626, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of all tracks in the album named Balls to the Wall?", "output": "SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = \"Balls to the Wall\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of all tracks in the album named Balls to the Wall?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 627, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List title of albums have the number of tracks greater than 10.", "output": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count(T1.id) > 10;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List title of albums have the number of tracks greater than 10.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 628, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the albums that have more than 10 tracks?", "output": "SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count(T1.id) > 10;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the albums that have more than 10 tracks?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 629, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of tracks belongs to genre Rock and whose media type is MPEG audio file.", "output": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = \"Rock\" AND T3.name = \"MPEG audio file\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of tracks belongs to genre Rock and whose media type is MPEG audio file.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 630, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all Rock tracks that are stored on MPEG audio files?", "output": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = \"Rock\" AND T3.name = \"MPEG audio file\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all Rock tracks that are stored on MPEG audio files?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 631, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of tracks belongs to genre Rock or media type is MPEG audio file.", "output": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = \"Rock\" OR T3.name = \"MPEG audio file\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of tracks belongs to genre Rock or media type is MPEG audio file.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 632, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all tracks that belong to the Rock genre and whose media type is MPEG?", "output": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = \"Rock\" OR T3.name = \"MPEG audio file\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all tracks that belong to the Rock genre and whose media type is MPEG?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 633, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of tracks belongs to genre Rock or genre Jazz.", "output": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = \"Rock\" OR T1.name = \"Jazz\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of tracks belongs to genre Rock or genre Jazz.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 634, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the tracks that are Rock or Jazz songs?", "output": "SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = \"Rock\" OR T1.name = \"Jazz\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the tracks that are Rock or Jazz songs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 635, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of all tracks in the playlists of Movies.", "output": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = \"Movies\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of all tracks in the playlists of Movies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 636, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all tracks that are on playlists titled Movies?", "output": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = \"Movies\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all tracks that are on playlists titled Movies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 637, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of playlist which has number of tracks greater than 100.", "output": "SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING count(T1.track_id) > 100;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of playlist which has number of tracks greater than 100.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 638, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all playlists that have more than 100 tracks?", "output": "SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING count(T1.track_id) > 100;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all playlists that have more than 100 tracks?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 639, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all tracks bought by customer Daan Peeters.", "output": "SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = \"Daan\" AND T4.last_name = \"Peeters\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all tracks bought by customer Daan Peeters.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 640, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the tracks that Dean Peeters bought?", "output": "SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = \"Daan\" AND T4.last_name = \"Peeters\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the tracks that Dean Peeters bought?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 641, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How much is the track Fast As a Shark?", "output": "SELECT unit_price FROM tracks WHERE name = \"Fast As a Shark\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How much is the track Fast As a Shark?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 642, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the unit price of the tune \"Fast As a Shark\"?", "output": "SELECT unit_price FROM tracks WHERE name = \"Fast As a Shark\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the unit price of the tune \"Fast As a Shark\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 643, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of tracks which are in Movies playlist but not in music playlist.", "output": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of tracks which are in Movies playlist but not in music playlist.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 644, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all tracks that are on the Movies playlist but not in the music playlist?", "output": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all tracks that are on the Movies playlist but not in the music playlist?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 645, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of tracks which are in both Movies and music playlists.", "output": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of tracks which are in both Movies and music playlists.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 646, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the tracks that are in both the Movies and music playlists?", "output": "SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the tracks that are in both the Movies and music playlists?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 647, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find number of tracks in each genre?", "output": "SELECT count(*) , T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find number of tracks in each genre?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_1", "id": 648, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many tracks are in each genre?", "output": "SELECT count(*) , T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many tracks are in each genre?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 649, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many editors are there?", "output": "SELECT count(*) FROM editor", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: How many editors are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 650, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of editors in ascending order of age.", "output": "SELECT Name FROM editor ORDER BY Age ASC", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: List the names of editors in ascending order of age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 651, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and ages of editors?", "output": "SELECT Name , Age FROM editor", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: What are the names and ages of editors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 652, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of editors who are older than 25.", "output": "SELECT Name FROM editor WHERE Age > 25", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: List the names of editors who are older than 25.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 653, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of editors of age either 24 or 25.", "output": "SELECT Name FROM editor WHERE Age = 24 OR Age = 25", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: Show the names of editors of age either 24 or 25.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 654, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the youngest editor?", "output": "SELECT Name FROM editor ORDER BY Age ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: What is the name of the youngest editor?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 655, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different ages of editors? Show each age along with the number of editors of that age.", "output": "SELECT Age , COUNT(*) FROM editor GROUP BY Age", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: What are the different ages of editors? Show each age along with the number of editors of that age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 656, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the most common age of editors.", "output": "SELECT Age FROM editor GROUP BY Age ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: Please show the most common age of editors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 657, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the distinct themes of journals.", "output": "SELECT DISTINCT Theme FROM journal", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: Show the distinct themes of journals.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 658, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of editors and the theme of journals for which they serve on committees.", "output": "SELECT T2.Name , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: Show the names of editors and the theme of journals for which they serve on committees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 659, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each journal_committee, find the editor name and the journal theme.", "output": "SELECT T2.Name , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: For each journal_committee, find the editor name and the journal theme.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 660, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names and ages of editors and the theme of journals for which they serve on committees, in ascending alphabetical order of theme.", "output": "SELECT T2.Name , T2.age , T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID ORDER BY T3.Theme ASC", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: Show the names and ages of editors and the theme of journals for which they serve on committees, in ascending alphabetical order of theme.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 661, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of editors that are on the committee of journals with sales bigger than 3000.", "output": "SELECT T2.Name FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID = T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID = T3.Journal_ID WHERE T3.Sales > 3000", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: Show the names of editors that are on the committee of journals with sales bigger than 3000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 662, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the id, name of each editor and the number of journal committees they are on.", "output": "SELECT T1.editor_id , T1.Name , COUNT(*) FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.editor_id", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: Show the id, name of each editor and the number of journal committees they are on.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 663, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of editors that are on at least two journal committees.", "output": "SELECT T1.Name FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Name HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: Show the names of editors that are on at least two journal committees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 664, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of editors that are not on any journal committee.", "output": "SELECT Name FROM editor WHERE editor_id NOT IN (SELECT editor_id FROM journal_committee)", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: List the names of editors that are not on any journal committee.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 665, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the date, theme and sales of the journal which did not have any of the listed editors serving on committee.", "output": "SELECT date , theme , sales FROM journal EXCEPT SELECT T1.date , T1.theme , T1.sales FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: List the date, theme and sales of the journal which did not have any of the listed editors serving on committee.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "journal_committee", "id": 666, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average sales of the journals that have an editor whose work type is 'Photo'?", "output": "SELECT avg(T1.sales) FROM journal AS T1 JOIN journal_committee AS T2 ON T1.journal_ID = T2.journal_ID WHERE T2.work_type = 'Photo'", "input": "Based on \n# the table&column(database schema) information {'journal': ['Journal_ID', 'Date', 'Theme', 'Sales'], 'editor': ['Editor_ID', 'Name', 'Age'], 'journal_committee': ['Editor_ID', 'Journal_ID', 'Work_Type']} and \n# the user question: What is the average sales of the journals that have an editor whose work type is 'Photo'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 667, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many accounts do we have?", "output": "SELECT count(*) FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many accounts do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 668, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of accounts.", "output": "SELECT count(*) FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 669, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show ids, customer ids, names for all accounts.", "output": "SELECT account_id , customer_id , account_name FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show ids, customer ids, names for all accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 670, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the account ids, customer ids, and account names for all the accounts?", "output": "SELECT account_id , customer_id , account_name FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the account ids, customer ids, and account names for all the accounts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 671, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show other account details for account with name 338.", "output": "SELECT other_account_details FROM Accounts WHERE account_name = \"338\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show other account details for account with name 338.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 672, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the other account details for the account with the name 338?", "output": "SELECT other_account_details FROM Accounts WHERE account_name = \"338\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the other account details for the account with the name 338?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 673, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name, last name, and phone of the customer with account name 162?", "output": "SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = \"162\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name, last name, and phone of the customer with account name 162?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 674, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the full name and phone of the customer who has the account name 162.", "output": "SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = \"162\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the full name and phone of the customer who has the account name 162.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 675, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many accounts does the customer with first name Art and last name Turcotte have?", "output": "SELECT count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Art\" AND T2.customer_last_name = \"Turcotte\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many accounts does the customer with first name Art and last name Turcotte have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 676, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the number of accounts that the customer with the first name Art and last name Turcotte has.", "output": "SELECT count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Art\" AND T2.customer_last_name = \"Turcotte\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the number of accounts that the customer with the first name Art and last name Turcotte has.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 677, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all customer ids and the number of accounts for each customer.", "output": "SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all customer ids and the number of accounts for each customer.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 678, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many accounts are there for each customer id?", "output": "SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many accounts are there for each customer id?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 679, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the customer id and number of accounts with most accounts.", "output": "SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the customer id and number of accounts with most accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 680, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the customer id of the customer with the most accounts, and how many accounts does this person have?", "output": "SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the customer id of the customer with the most accounts, and how many accounts does this person have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 681, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the customer first, last name and id with least number of accounts.", "output": "SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the customer first, last name and id with least number of accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 682, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the full name and customer id of the customer with the fewest accounts.", "output": "SELECT T2.customer_first_name , T2.customer_last_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the full name and customer id of the customer with the fewest accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 683, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of all customers without an account.", "output": "SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of all customers without an account.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 684, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers do not have an account?", "output": "SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers do not have an account?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 685, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the first names and last names of customers without any account.", "output": "SELECT customer_first_name , customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the first names and last names of customers without any account.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 686, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names of customers who do not have any accounts?", "output": "SELECT customer_first_name , customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full names of customers who do not have any accounts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 687, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show distinct first and last names for all customers with an account.", "output": "SELECT DISTINCT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show distinct first and last names for all customers with an account.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 688, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names of customers who have accounts?", "output": "SELECT DISTINCT T1.customer_first_name , T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full names of customers who have accounts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 689, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers have an account?", "output": "SELECT count(DISTINCT customer_id) FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers have an account?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 690, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of customers who hold an account.", "output": "SELECT count(DISTINCT customer_id) FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of customers who hold an account.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 691, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers do we have?", "output": "SELECT count(*) FROM Customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 692, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of customers.", "output": "SELECT count(*) FROM Customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 693, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show ids, first names, last names, and phones for all customers.", "output": "SELECT customer_id , customer_first_name , customer_last_name , customer_phone FROM Customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show ids, first names, last names, and phones for all customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 694, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids, full names, and phones of each customer?", "output": "SELECT customer_id , customer_first_name , customer_last_name , customer_phone FROM Customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids, full names, and phones of each customer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 695, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the phone and email for customer with first name Aniyah and last name Feest?", "output": "SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = \"Aniyah\" AND customer_last_name = \"Feest\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the phone and email for customer with first name Aniyah and last name Feest?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 696, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the phone and email of the customer with the first name Aniyah and last name Feest.", "output": "SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = \"Aniyah\" AND customer_last_name = \"Feest\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the phone and email of the customer with the first name Aniyah and last name Feest.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 697, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of customer cards.", "output": "SELECT count(*) FROM Customers_cards", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of customer cards.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 698, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customer cards are there?", "output": "SELECT count(*) FROM Customers_cards", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customer cards are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 699, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show ids, customer ids, card type codes, card numbers for all cards.", "output": "SELECT card_id , customer_id , card_type_code , card_number FROM Customers_cards", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show ids, customer ids, card type codes, card numbers for all cards.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 700, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are card ids, customer ids, card types, and card numbers for each customer card?", "output": "SELECT card_id , customer_id , card_type_code , card_number FROM Customers_cards", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are card ids, customer ids, card types, and card numbers for each customer card?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 701, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the date valid from and the date valid to for the card with card number '4560596484842'.", "output": "SELECT date_valid_from , date_valid_to FROM Customers_cards WHERE card_number = \"4560596484842\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the date valid from and the date valid to for the card with card number '4560596484842'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 702, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the valid from and valid to dates for the card with the number 4560596484842?", "output": "SELECT date_valid_from , date_valid_to FROM Customers_cards WHERE card_number = \"4560596484842\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the valid from and valid to dates for the card with the number 4560596484842?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 703, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name, last name, and phone of the customer with card 4560596484842.", "output": "SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = \"4560596484842\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name, last name, and phone of the customer with card 4560596484842.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 704, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the full name and phone of the customer who has card number 4560596484842.", "output": "SELECT T2.customer_first_name , T2.customer_last_name , T2.customer_phone FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.card_number = \"4560596484842\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the full name and phone of the customer who has card number 4560596484842.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 705, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many cards does customer Art Turcotte have?", "output": "SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Art\" AND T2.customer_last_name = \"Turcotte\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many cards does customer Art Turcotte have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 706, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of cards the customer with the first name Art and last name Turcotte has.", "output": "SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Art\" AND T2.customer_last_name = \"Turcotte\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of cards the customer with the first name Art and last name Turcotte has.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 707, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many debit cards do we have?", "output": "SELECT count(*) FROM Customers_cards WHERE card_type_code = \"Debit\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many debit cards do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 708, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of customer cards of the type Debit.", "output": "SELECT count(*) FROM Customers_cards WHERE card_type_code = \"Debit\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of customer cards of the type Debit.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 709, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many credit cards does customer Blanche Huels have?", "output": "SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Blanche\" AND T2.customer_last_name = \"Huels\" AND T1.card_type_code = \"Credit\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many credit cards does customer Blanche Huels have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 710, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of credit cards that the customer with first name Blanche and last name Huels has.", "output": "SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Blanche\" AND T2.customer_last_name = \"Huels\" AND T1.card_type_code = \"Credit\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of credit cards that the customer with first name Blanche and last name Huels has.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 711, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all customer ids and the number of cards owned by each customer.", "output": "SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all customer ids and the number of cards owned by each customer.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 712, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different customer ids, and how many cards does each one hold?", "output": "SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different customer ids, and how many cards does each one hold?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 713, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the customer id with most number of cards, and how many does he have?", "output": "SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the customer id with most number of cards, and how many does he have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 714, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the id of the customer who has the most cards, as well as the number of cards.", "output": "SELECT customer_id , count(*) FROM Customers_cards GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the id of the customer who has the most cards, as well as the number of cards.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 715, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show id, first and last names for all customers with at least two cards.", "output": "SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show id, first and last names for all customers with at least two cards.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 716, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and full names of customers who hold two or more cards?", "output": "SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids and full names of customers who hold two or more cards?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 717, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the customer id, first and last name with least number of accounts.", "output": "SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the customer id, first and last name with least number of accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 718, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the id and full name of the customer who has the fewest accounts.", "output": "SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the id and full name of the customer who has the fewest accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 719, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all card type codes and the number of cards in each type.", "output": "SELECT card_type_code , count(*) FROM Customers_cards GROUP BY card_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all card type codes and the number of cards in each type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 720, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different card types, and how many cards are there of each?", "output": "SELECT card_type_code , count(*) FROM Customers_cards GROUP BY card_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different card types, and how many cards are there of each?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 721, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the card type code with most number of cards?", "output": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the card type code with most number of cards?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 722, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the code of the card type that is most common.", "output": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the code of the card type that is most common.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 723, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show card type codes with at least 5 cards.", "output": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING count(*) >= 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show card type codes with at least 5 cards.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 724, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the codes of card types that have 5 or more cards?", "output": "SELECT card_type_code FROM Customers_cards GROUP BY card_type_code HAVING count(*) >= 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the codes of card types that have 5 or more cards?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 725, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all card type codes and the number of customers holding cards in each type.", "output": "SELECT card_type_code , count(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all card type codes and the number of customers holding cards in each type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 726, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different card type codes, and how many different customers hold each type?", "output": "SELECT card_type_code , count(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different card type codes, and how many different customers hold each type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 727, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the customer ids and firstname without a credit card.", "output": "SELECT customer_id , customer_first_name FROM Customers EXCEPT SELECT T1.customer_id , T2.customer_first_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE card_type_code = \"Credit\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the customer ids and firstname without a credit card.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 728, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and first names of customers who do not hold a credit card?", "output": "SELECT customer_id , customer_first_name FROM Customers EXCEPT SELECT T1.customer_id , T2.customer_first_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE card_type_code = \"Credit\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids and first names of customers who do not hold a credit card?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 729, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all card type codes.", "output": "SELECT DISTINCT card_type_code FROM Customers_Cards", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all card type codes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 730, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different card type codes?", "output": "SELECT DISTINCT card_type_code FROM Customers_Cards", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different card type codes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 731, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of card types.", "output": "SELECT count(DISTINCT card_type_code) FROM Customers_Cards", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of card types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 732, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different card types are there?", "output": "SELECT count(DISTINCT card_type_code) FROM Customers_Cards", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different card types are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 733, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all transaction types.", "output": "SELECT DISTINCT transaction_type FROM Financial_Transactions", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all transaction types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 734, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different types of transactions?", "output": "SELECT DISTINCT transaction_type FROM Financial_Transactions", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different types of transactions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 735, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of transaction types.", "output": "SELECT count(DISTINCT transaction_type) FROM Financial_Transactions", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of transaction types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 736, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different types of transactions are there?", "output": "SELECT count(DISTINCT transaction_type) FROM Financial_Transactions", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different types of transactions are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 737, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average and total transaction amount?", "output": "SELECT avg(transaction_amount) , sum(transaction_amount) FROM Financial_transactions", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average and total transaction amount?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 738, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the average transaction amount, as well as the total amount of all transactions.", "output": "SELECT avg(transaction_amount) , sum(transaction_amount) FROM Financial_transactions", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the average transaction amount, as well as the total amount of all transactions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 739, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the card type codes and the number of transactions.", "output": "SELECT T2.card_type_code , count(*) FROM Financial_transactions AS T1 JOIN Customers_cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the card type codes and the number of transactions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 740, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different card types, and how many transactions have been made with each?", "output": "SELECT T2.card_type_code , count(*) FROM Financial_transactions AS T1 JOIN Customers_cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different card types, and how many transactions have been made with each?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 741, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the transaction type and the number of transactions.", "output": "SELECT transaction_type , count(*) FROM Financial_transactions GROUP BY transaction_type", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the transaction type and the number of transactions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 742, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different transaction types, and how many transactions of each have taken place?", "output": "SELECT transaction_type , count(*) FROM Financial_transactions GROUP BY transaction_type", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different transaction types, and how many transactions of each have taken place?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 743, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the transaction type that has processed the greatest total amount in transactions?", "output": "SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY sum(transaction_amount) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the transaction type that has processed the greatest total amount in transactions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 744, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the type of transaction with the highest total amount.", "output": "SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY sum(transaction_amount) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the type of transaction with the highest total amount.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 745, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the account id and the number of transactions for each account", "output": "SELECT account_id , count(*) FROM Financial_transactions GROUP BY account_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the account id and the number of transactions for each account,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_card_transactions", "id": 746, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different account ids that have made financial transactions, as well as how many transactions correspond to each?", "output": "SELECT account_id , count(*) FROM Financial_transactions GROUP BY account_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different account ids that have made financial transactions, as well as how many transactions correspond to each?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 747, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many tracks do we have?", "output": "SELECT count(*) FROM track", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: How many tracks do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 748, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of tracks.", "output": "SELECT count(*) FROM track", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Count the number of tracks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 749, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name and location for all tracks.", "output": "SELECT name , LOCATION FROM track", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Show the name and location for all tracks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 750, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and locations of all tracks?", "output": "SELECT name , LOCATION FROM track", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What are the names and locations of all tracks?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 751, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names and seatings, ordered by seating for all tracks opened after 2000.", "output": "SELECT name , seating FROM track WHERE year_opened > 2000 ORDER BY seating", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Show names and seatings, ordered by seating for all tracks opened after 2000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 752, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and seatings for all tracks opened after 2000, ordered by seating?", "output": "SELECT name , seating FROM track WHERE year_opened > 2000 ORDER BY seating", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What are the names and seatings for all tracks opened after 2000, ordered by seating?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 753, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name, location and seating for the most recently opened track?", "output": "SELECT name , LOCATION , seating FROM track ORDER BY year_opened DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What is the name, location and seating for the most recently opened track?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 754, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name, location, and seating of the track that was opened in the most recent year.", "output": "SELECT name , LOCATION , seating FROM track ORDER BY year_opened DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Return the name, location, and seating of the track that was opened in the most recent year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 755, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the minimum, maximum, and average seating for all tracks.", "output": "SELECT min(seating) , max(seating) , avg(seating) FROM track", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What is the minimum, maximum, and average seating for all tracks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 756, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the minimum, maximum, and average seating across all tracks.", "output": "SELECT min(seating) , max(seating) , avg(seating) FROM track", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Return the minimum, maximum, and average seating across all tracks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 757, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name, location, open year for all tracks with a seating higher than the average.", "output": "SELECT name , LOCATION , year_opened FROM track WHERE seating > (SELECT avg(seating) FROM track)", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Show the name, location, open year for all tracks with a seating higher than the average.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 758, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names, locations, and years of opening for tracks with seating higher than average?", "output": "SELECT name , LOCATION , year_opened FROM track WHERE seating > (SELECT avg(seating) FROM track)", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What are the names, locations, and years of opening for tracks with seating higher than average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 759, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are distinct locations where tracks are located?", "output": "SELECT DISTINCT LOCATION FROM track", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What are distinct locations where tracks are located?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 760, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the different locations of tracks.", "output": "SELECT DISTINCT LOCATION FROM track", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Give the different locations of tracks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 761, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many races are there?", "output": "SELECT count(*) FROM race", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: How many races are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 762, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of races.", "output": "SELECT count(*) FROM race", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Count the number of races.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 763, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct classes that races can have?", "output": "SELECT DISTINCT CLASS FROM race", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What are the distinct classes that races can have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 764, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the different classes of races.", "output": "SELECT DISTINCT CLASS FROM race", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Return the different classes of races.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 765, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show name, class, and date for all races.", "output": "SELECT name , CLASS , date FROM race", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Show name, class, and date for all races.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 766, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names, classes, and dates for all races?", "output": "SELECT name , CLASS , date FROM race", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What are the names, classes, and dates for all races?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 767, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the race class and number of races in each class.", "output": "SELECT CLASS , count(*) FROM race GROUP BY CLASS", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Show the race class and number of races in each class.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 768, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different classes of races, and how many races correspond to each?", "output": "SELECT CLASS , count(*) FROM race GROUP BY CLASS", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What are the different classes of races, and how many races correspond to each?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 769, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the race class with most number of races.", "output": "SELECT CLASS FROM race GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What is the race class with most number of races.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 770, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the class of races that is most common.", "output": "SELECT CLASS FROM race GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Give the class of races that is most common.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 771, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the race class with at least two races.", "output": "SELECT CLASS FROM race GROUP BY CLASS HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: List the race class with at least two races.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 772, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the classes of races that have two or more corresponding races?", "output": "SELECT CLASS FROM race GROUP BY CLASS HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What are the classes of races that have two or more corresponding races?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 773, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names for tracks without a race in class 'GT'.", "output": "SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT'", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What are the names for tracks without a race in class 'GT'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 774, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the names of tracks that do not have a race in the class 'GT'.", "output": "SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id WHERE T1.class = 'GT'", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Give the names of tracks that do not have a race in the class 'GT'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 775, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all track names that have had no races.", "output": "SELECT name FROM track WHERE track_id NOT IN (SELECT track_id FROM race)", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Show all track names that have had no races.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 776, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of tracks that have no had any races.", "output": "SELECT name FROM track WHERE track_id NOT IN (SELECT track_id FROM race)", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Return the names of tracks that have no had any races.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 777, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show year where a track with a seating at least 5000 opened and a track with seating no more than 4000 opened.", "output": "SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Show year where a track with a seating at least 5000 opened and a track with seating no more than 4000 opened.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 778, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the years of opening for tracks with seating between 4000 and 5000?", "output": "SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What are the years of opening for tracks with seating between 4000 and 5000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 779, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of track and the number of races in each track.", "output": "SELECT T2.name , count(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Show the name of track and the number of races in each track.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 780, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of different tracks, and how many races has each had?", "output": "SELECT T2.name , count(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What are the names of different tracks, and how many races has each had?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 781, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of track with most number of races.", "output": "SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Show the name of track with most number of races.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 782, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the track that has had the greatest number of races?", "output": "SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What is the name of the track that has had the greatest number of races?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 783, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name and date for each race and its track name.", "output": "SELECT T1.name , T1.date , T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Show the name and date for each race and its track name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 784, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and dates of races, and the names of the tracks where they are held?", "output": "SELECT T1.name , T1.date , T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What are the names and dates of races, and the names of the tracks where they are held?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 785, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name and location of track with 1 race.", "output": "SELECT T2.name , T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id HAVING count(*) = 1", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Show the name and location of track with 1 race.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 786, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and locations of tracks that have had exactly 1 race?", "output": "SELECT T2.name , T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id HAVING count(*) = 1", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What are the names and locations of tracks that have had exactly 1 race?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 787, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the locations where have both tracks with more than 90000 seats and tracks with less than 70000 seats.", "output": "SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: Find the locations where have both tracks with more than 90000 seats and tracks with less than 70000 seats.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "race_track", "id": 788, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the locations that have both tracks with more than 90000 seats, and tracks with fewer than 70000 seats?", "output": "SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000", "input": "Based on \n# the table&column(database schema) information {'race': ['Race_ID', 'Name', 'Class', 'Date', 'Track_ID'], 'track': ['Track_ID', 'Name', 'Location', 'Seating', 'Year_Opened']} and \n# the user question: What are the locations that have both tracks with more than 90000 seats, and tracks with fewer than 70000 seats?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 789, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many members have the black membership card?", "output": "SELECT count(*) FROM member WHERE Membership_card = 'Black'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many members have the black membership card?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 790, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of members living in each address.", "output": "SELECT count(*) , address FROM member GROUP BY address", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of members living in each address.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 791, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the names of members whose address is in Harford or Waterbury.", "output": "SELECT name FROM member WHERE address = 'Harford' OR address = 'Waterbury'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the names of members whose address is in Harford or Waterbury.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 792, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the ids and names of members who are under age 30 or with black membership card.", "output": "SELECT name , member_id FROM member WHERE Membership_card = 'Black' OR age < 30", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the ids and names of members who are under age 30 or with black membership card.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 793, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the purchase time, age and address of each member, and show the results in the order of purchase time.", "output": "SELECT Time_of_purchase , age , address FROM member ORDER BY Time_of_purchase", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the purchase time, age and address of each member, and show the results in the order of purchase time.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 794, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which membership card has more than 5 members?", "output": "SELECT Membership_card FROM member GROUP BY Membership_card HAVING count(*) > 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which membership card has more than 5 members?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 795, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which address has both members younger than 30 and members older than 40?", "output": "SELECT address FROM member WHERE age < 30 INTERSECT SELECT address FROM member WHERE age > 40", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which address has both members younger than 30 and members older than 40?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 796, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the membership card held by both members living in Hartford and ones living in Waterbury address?", "output": "SELECT membership_card FROM member WHERE address = 'Hartford' INTERSECT SELECT membership_card FROM member WHERE address = 'Waterbury'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the membership card held by both members living in Hartford and ones living in Waterbury address?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 797, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many members are not living in Hartford?", "output": "SELECT count(*) FROM member WHERE address != 'Hartford'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many members are not living in Hartford?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 798, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which address do not have any member with the black membership card?", "output": "SELECT address FROM member EXCEPT SELECT address FROM member WHERE Membership_card = 'Black'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which address do not have any member with the black membership card?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 799, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the shop addresses ordered by their opening year.", "output": "SELECT address FROM shop ORDER BY open_year", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the shop addresses ordered by their opening year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 800, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average score and average staff number of all shops?", "output": "SELECT avg(num_of_staff) , avg(score) FROM shop", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the average score and average staff number of all shops?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 801, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id and address of the shops whose score is below the average score.", "output": "SELECT shop_id , address FROM shop WHERE score < (SELECT avg(score) FROM shop)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id and address of the shops whose score is below the average score.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 802, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the address and staff number of the shops that do not have any happy hour.", "output": "SELECT address , num_of_staff FROM shop WHERE shop_id NOT IN (SELECT shop_id FROM happy_hour)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the address and staff number of the shops that do not have any happy hour.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 803, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the id and address of the shops which have a happy hour in May?", "output": "SELECT t1.address , t1.shop_id FROM shop AS t1 JOIN happy_hour AS t2 ON t1.shop_id = t2.shop_id WHERE MONTH = 'May'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the id and address of the shops which have a happy hour in May?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 804, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "which shop has happy hour most frequently? List its id and number of happy hours.", "output": "SELECT shop_id , count(*) FROM happy_hour GROUP BY shop_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: which shop has happy hour most frequently? List its id and number of happy hours.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 805, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which month has the most happy hours?", "output": "SELECT MONTH FROM happy_hour GROUP BY MONTH ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which month has the most happy hours?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "coffee_shop", "id": 806, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which months have more than 2 happy hours?", "output": "SELECT MONTH FROM happy_hour GROUP BY MONTH HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which months have more than 2 happy hours?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 807, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many albums are there?", "output": "SELECT count(*) FROM ALBUM", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many albums are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 808, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of albums.", "output": "SELECT count(*) FROM ALBUM", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of albums.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 809, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all music genres.", "output": "SELECT Name FROM GENRE", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of all music genres.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 810, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of different music genres?", "output": "SELECT Name FROM GENRE", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of different music genres?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 811, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the customer information in state NY.", "output": "SELECT * FROM CUSTOMER WHERE State = \"NY\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the customer information in state NY.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 812, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is all the customer information for customers in NY state?", "output": "SELECT * FROM CUSTOMER WHERE State = \"NY\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is all the customer information for customers in NY state?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 813, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names and last names of the employees who live in Calgary city.", "output": "SELECT FirstName , LastName FROM EMPLOYEE WHERE City = \"Calgary\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names and last names of the employees who live in Calgary city.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 814, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the full names of employees living in the city of Calgary.", "output": "SELECT FirstName , LastName FROM EMPLOYEE WHERE City = \"Calgary\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the full names of employees living in the city of Calgary.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 815, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct billing countries of the invoices?", "output": "SELECT distinct(BillingCountry) FROM INVOICE", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct billing countries of the invoices?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 816, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the different billing countries for all invoices.", "output": "SELECT distinct(BillingCountry) FROM INVOICE", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the different billing countries for all invoices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 817, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all artists that have \"a\" in their names.", "output": "SELECT Name FROM ARTIST WHERE Name LIKE \"%a%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all artists that have \"a\" in their names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 818, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of artist who have the letter 'a' in their names?", "output": "SELECT Name FROM ARTIST WHERE Name LIKE \"%a%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of artist who have the letter 'a' in their names?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 819, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the title of all the albums of the artist \"AC/DC\".", "output": "SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = \"AC/DC\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the title of all the albums of the artist \"AC/DC\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 820, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of albums by the artist \"AC/DC\"?", "output": "SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = \"AC/DC\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the titles of albums by the artist \"AC/DC\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 821, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Hom many albums does the artist \"Metallica\" have?", "output": "SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = \"Metallica\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Hom many albums does the artist \"Metallica\" have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 822, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of albums by the artist \"Metallica\".", "output": "SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = \"Metallica\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of albums by the artist \"Metallica\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 823, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which artist does the album \"Balls to the Wall\" belong to?", "output": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = \"Balls to the Wall\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which artist does the album \"Balls to the Wall\" belong to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 824, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the artist who made the album \"Balls to the Wall\".", "output": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = \"Balls to the Wall\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the artist who made the album \"Balls to the Wall\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 825, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which artist has the most albums?", "output": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId GROUP BY T2.Name ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which artist has the most albums?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 826, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the artist with the greatest number of albums?", "output": "SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId GROUP BY T2.Name ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the artist with the greatest number of albums?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 827, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all the tracks that contain the word \"you\".", "output": "SELECT Name FROM TRACK WHERE Name LIKE '%you%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all the tracks that contain the word \"you\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 828, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of tracks that contain the the word you in them?", "output": "SELECT Name FROM TRACK WHERE Name LIKE '%you%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of tracks that contain the the word you in them?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 829, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average unit price of all the tracks?", "output": "SELECT AVG(UnitPrice) FROM TRACK", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average unit price of all the tracks?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 830, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average unit price for a track.", "output": "SELECT AVG(UnitPrice) FROM TRACK", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average unit price for a track.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 831, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the durations of the longest and the shortest tracks in milliseconds?", "output": "SELECT max(Milliseconds) , min(Milliseconds) FROM TRACK", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the durations of the longest and the shortest tracks in milliseconds?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 832, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the maximum and minimum durations of tracks in milliseconds.", "output": "SELECT max(Milliseconds) , min(Milliseconds) FROM TRACK", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the maximum and minimum durations of tracks in milliseconds.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 833, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the album names, ids and the number of tracks for each album.", "output": "SELECT T1.Title , T2.AlbumID , COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the album names, ids and the number of tracks for each album.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 834, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and ids of the different albums, and how many tracks are on each?", "output": "SELECT T1.Title , T2.AlbumID , COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId GROUP BY T2.AlbumID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and ids of the different albums, and how many tracks are on each?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 835, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the most common genre in all tracks?", "output": "SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId GROUP BY T2.GenreId ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the most common genre in all tracks?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 836, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the genre that is most frequent across all tracks.", "output": "SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId GROUP BY T2.GenreId ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the genre that is most frequent across all tracks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 837, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the least common media type in all tracks?", "output": "SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId ORDER BY COUNT(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the least common media type in all tracks?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 838, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the media type that is least common across all tracks?", "output": "SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId ORDER BY COUNT(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the media type that is least common across all tracks?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 839, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the album names and ids for albums that contain tracks with unit price bigger than 1.", "output": "SELECT T1.Title , T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the album names and ids for albums that contain tracks with unit price bigger than 1.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 840, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles and ids for albums containing tracks with unit price greater than 1?", "output": "SELECT T1.Title , T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 GROUP BY T2.AlbumID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the titles and ids for albums containing tracks with unit price greater than 1?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 841, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many tracks belong to rock genre?", "output": "SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Rock\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many tracks belong to rock genre?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 842, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of tracks that are part of the rock genre.", "output": "SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Rock\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of tracks that are part of the rock genre.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 843, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average unit price of tracks that belong to Jazz genre?", "output": "SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Jazz\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average unit price of tracks that belong to Jazz genre?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 844, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average unit price of jazz tracks.", "output": "SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Jazz\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average unit price of jazz tracks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 845, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name and last name of the customer that has email \"luisg@embraer.com.br\"?", "output": "SELECT FirstName , LastName FROM CUSTOMER WHERE Email = \"luisg@embraer.com.br\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name and last name of the customer that has email \"luisg@embraer.com.br\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 846, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the full name of the customer with the email \"luisg@embraer.com.br\".", "output": "SELECT FirstName , LastName FROM CUSTOMER WHERE Email = \"luisg@embraer.com.br\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the full name of the customer with the email \"luisg@embraer.com.br\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 847, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers have email that contains \"gmail.com\"?", "output": "SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE \"%gmail.com%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers have email that contains \"gmail.com\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 848, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of customers that have an email containing \"gmail.com\".", "output": "SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE \"%gmail.com%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of customers that have an email containing \"gmail.com\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 849, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name and last name employee helps the customer with first name Leonie?", "output": "SELECT T2.FirstName , T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = \"Leonie\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name and last name employee helps the customer with first name Leonie?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 850, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the full names of employees who help customers with the first name Leonie.", "output": "SELECT T2.FirstName , T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.FirstName = \"Leonie\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the full names of employees who help customers with the first name Leonie.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 851, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What city does the employee who helps the customer with postal code 70174 live in?", "output": "SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = \"70174\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What city does the employee who helps the customer with postal code 70174 live in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 852, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the cities corresponding to employees who help customers with the postal code 70174.", "output": "SELECT T2.City FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId WHERE T1.PostalCode = \"70174\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the cities corresponding to employees who help customers with the postal code 70174.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 853, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct cities does the employees live in?", "output": "SELECT COUNT(DISTINCT city) FROM EMPLOYEE", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct cities does the employees live in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 854, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of different cities that employees live in.", "output": "SELECT COUNT(DISTINCT city) FROM EMPLOYEE", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of different cities that employees live in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 855, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all invoice dates corresponding to customers with first name Astrid and last name Gruber.", "output": "SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = \"Astrid\" AND LastName = \"Gruber\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all invoice dates corresponding to customers with first name Astrid and last name Gruber.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 856, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the invoice dates for customers with the first name Astrid and the last name Gruber?", "output": "SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = \"Astrid\" AND LastName = \"Gruber\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the invoice dates for customers with the first name Astrid and the last name Gruber?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 857, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the customer last names that do not have invoice totals larger than 20.", "output": "SELECT LastName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId = T2.CustomerId WHERE T2.total > 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the customer last names that do not have invoice totals larger than 20.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 858, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the last names of customers without invoice totals exceeding 20?", "output": "SELECT LastName FROM CUSTOMER EXCEPT SELECT T1.LastName FROM CUSTOMER AS T1 JOIN Invoice AS T2 ON T1.CustomerId = T2.CustomerId WHERE T2.total > 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the last names of customers without invoice totals exceeding 20?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 859, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of all customers that live in Brazil and have an invoice.", "output": "SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = \"Brazil\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names of all customers that live in Brazil and have an invoice.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 860, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different first names for customers from Brazil who have also had an invoice?", "output": "SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = \"Brazil\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different first names for customers from Brazil who have also had an invoice?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 861, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the address of all customers that live in Germany and have invoice.", "output": "SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = \"Germany\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the address of all customers that live in Germany and have invoice.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 862, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the addresses of customers living in Germany who have had an invoice?", "output": "SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = \"Germany\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the addresses of customers living in Germany who have had an invoice?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 863, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the phone numbers of all employees.", "output": "SELECT Phone FROM EMPLOYEE", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the phone numbers of all employees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 864, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the phone numbers for each employee?", "output": "SELECT Phone FROM EMPLOYEE", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the phone numbers for each employee?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 865, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many tracks are in the AAC audio file media type?", "output": "SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = \"AAC audio file\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many tracks are in the AAC audio file media type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 866, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of tracks that are of the media type \"AAC audio file\".", "output": "SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId WHERE T1.Name = \"AAC audio file\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of tracks that are of the media type \"AAC audio file\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 867, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average duration in milliseconds of tracks that belong to Latin or Pop genre?", "output": "SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Latin\" OR T1.Name = \"Pop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average duration in milliseconds of tracks that belong to Latin or Pop genre?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 868, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average millisecond length of Latin and Pop tracks.", "output": "SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Latin\" OR T1.Name = \"Pop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average millisecond length of Latin and Pop tracks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 869, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the employee first names and ids of employees who serve at least 10 customers.", "output": "SELECT T1.FirstName , T1.SupportRepId FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) >= 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the employee first names and ids of employees who serve at least 10 customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 870, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names and support rep ids for employees serving 10 or more customers?", "output": "SELECT T1.FirstName , T1.SupportRepId FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) >= 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names and support rep ids for employees serving 10 or more customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 871, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the employee last names that serves no more than 20 customers.", "output": "SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the employee last names that serves no more than 20 customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 872, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the last names of employees who serve at most 20 customers?", "output": "SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the last names of employees who serve at most 20 customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 873, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please list all album titles in alphabetical order.", "output": "SELECT Title FROM ALBUM ORDER BY Title", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please list all album titles in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 874, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the album titles, in alphabetical order?", "output": "SELECT Title FROM ALBUM ORDER BY Title", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the album titles, in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 875, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please list the name and id of all artists that have at least 3 albums in alphabetical order.", "output": "SELECT T2.Name , T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistID GROUP BY T1.ArtistId HAVING COUNT(*) >= 3 ORDER BY T2.Name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please list the name and id of all artists that have at least 3 albums in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 876, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and ids of artists with 3 or more albums, listed in alphabetical order?", "output": "SELECT T2.Name , T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistID GROUP BY T1.ArtistId HAVING COUNT(*) >= 3 ORDER BY T2.Name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and ids of artists with 3 or more albums, listed in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 877, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of artists that do not have any albums.", "output": "SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of artists that do not have any albums.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 878, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of artists who have not released any albums?", "output": "SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of artists who have not released any albums?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 879, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average unit price of rock tracks?", "output": "SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Rock\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average unit price of rock tracks?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 880, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average unit price of tracks from the Rock genre.", "output": "SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Rock\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average unit price of tracks from the Rock genre.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 881, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the duration of the longest and shortest pop tracks in milliseconds?", "output": "SELECT max(Milliseconds) , min(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Pop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the duration of the longest and shortest pop tracks in milliseconds?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 882, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the maximum and minimum millisecond lengths of pop tracks.", "output": "SELECT max(Milliseconds) , min(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = \"Pop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the maximum and minimum millisecond lengths of pop tracks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 883, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the birth dates of employees living in Edmonton?", "output": "SELECT BirthDate FROM EMPLOYEE WHERE City = \"Edmonton\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the birth dates of employees living in Edmonton?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 884, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the birth dates corresponding to employees who live in the city of Edmonton.", "output": "SELECT BirthDate FROM EMPLOYEE WHERE City = \"Edmonton\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the birth dates corresponding to employees who live in the city of Edmonton.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 885, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct unit prices of all tracks?", "output": "SELECT distinct(UnitPrice) FROM TRACK", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct unit prices of all tracks?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 886, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct unit prices for tracks.", "output": "SELECT distinct(UnitPrice) FROM TRACK", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the distinct unit prices for tracks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 887, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many artists do not have any album?", "output": "SELECT count(*) FROM ARTIST WHERE artistid NOT IN(SELECT artistid FROM ALBUM)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many artists do not have any album?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 888, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Cound the number of artists who have not released an album.", "output": "SELECT count(*) FROM ARTIST WHERE artistid NOT IN(SELECT artistid FROM ALBUM)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Cound the number of artists who have not released an album.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 889, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks?", "output": "SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Rock'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "chinook_1", "id": 890, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the titles of albums that contain tracks of both the Reggae and Rock genres.", "output": "SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Rock'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the titles of albums that contain tracks of both the Reggae and Rock genres.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 891, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the phone numbers.", "output": "SELECT customer_phone FROM available_policies", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the phone numbers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 892, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the phone numbers?", "output": "SELECT customer_phone FROM available_policies", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the phone numbers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 893, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the customer phone numbers under the policy \"Life Insurance\"?", "output": "SELECT customer_phone FROM available_policies WHERE policy_type_code = \"Life Insurance\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the customer phone numbers under the policy \"Life Insurance\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 894, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the phone numbers of customers using the policy with the code \"Life Insurance\"?", "output": "SELECT customer_phone FROM available_policies WHERE policy_type_code = \"Life Insurance\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the phone numbers of customers using the policy with the code \"Life Insurance\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 895, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which policy type has the most records in the database?", "output": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which policy type has the most records in the database?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 896, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which policy type appears most frequently in the available policies?", "output": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which policy type appears most frequently in the available policies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 897, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the customer phone numbers under the most popular policy type?", "output": "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)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the customer phone numbers under the most popular policy type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 898, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the phone numbers of customers using the most common policy type among the available policies.", "output": "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)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the phone numbers of customers using the most common policy type among the available policies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 899, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the policy type used by more than 4 customers.", "output": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING count(*) > 4", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the policy type used by more than 4 customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 900, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the policy types more than 4 customers use. Show their type code.", "output": "SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING count(*) > 4", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the policy types more than 4 customers use. Show their type code.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 901, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total and average amount of settlements.", "output": "SELECT sum(settlement_amount) , avg(settlement_amount) FROM settlements", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total and average amount of settlements.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 902, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the sum and average of all settlement amounts.", "output": "SELECT sum(settlement_amount) , avg(settlement_amount) FROM settlements", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the sum and average of all settlement amounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 903, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of services that have been used for more than 2 times in first notification of loss.", "output": "SELECT t2.service_name FROM first_notification_of_loss AS t1 JOIN services AS t2 ON t1.service_id = t2.service_id GROUP BY t1.service_id HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of services that have been used for more than 2 times in first notification of loss.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 904, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which services have been used more than twice in first notification of loss? Return the service name.", "output": "SELECT t2.service_name FROM first_notification_of_loss AS t1 JOIN services AS t2 ON t1.service_id = t2.service_id GROUP BY t1.service_id HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which services have been used more than twice in first notification of loss? Return the service name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 905, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the effective date of the claim that has the largest amount of total settlement?", "output": "SELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id = t2.claim_id GROUP BY t1.claim_id ORDER BY sum(t2.settlement_amount) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the effective date of the claim that has the largest amount of total settlement?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 906, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the claim that has the largest total settlement amount. Return the effective date of the claim.", "output": "SELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id = t2.claim_id GROUP BY t1.claim_id ORDER BY sum(t2.settlement_amount) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the claim that has the largest total settlement amount. Return the effective date of the claim.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 907, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many policies are listed for the customer named \"Dayana Robel\"?", "output": "SELECT count(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Dayana Robel\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many policies are listed for the customer named \"Dayana Robel\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 908, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the total number of policies used by the customer named \"Dayana Robel\".", "output": "SELECT count(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Dayana Robel\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the total number of policies used by the customer named \"Dayana Robel\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 909, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the customer who has the most policies listed?", "output": "SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the customer who has the most policies listed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 910, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customer uses the most policies? Give me the customer name.", "output": "SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customer uses the most policies? Give me the customer name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 911, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the policy types of the customer named \"Dayana Robel\"?", "output": "SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = \"Dayana Robel\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the policy types of the customer named \"Dayana Robel\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 912, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Tell me the types of the policy used by the customer named \"Dayana Robel\".", "output": "SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = \"Dayana Robel\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Tell me the types of the policy used by the customer named \"Dayana Robel\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 913, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the policy types of the customer that has the most policies listed?", "output": "SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = (SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY count(*) DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the policy types of the customer that has the most policies listed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 914, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the policy types used by the customer enrolled in the most policies.", "output": "SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = (SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY count(*) DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the policy types used by the customer enrolled in the most policies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 915, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the services in the alphabetical order.", "output": "SELECT service_name FROM services ORDER BY service_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the services in the alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 916, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me a list of all the service names sorted alphabetically.", "output": "SELECT service_name FROM services ORDER BY service_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me a list of all the service names sorted alphabetically.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 917, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many services are there?", "output": "SELECT count(*) FROM services", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many services are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 918, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the total number of available services.", "output": "SELECT count(*) FROM services", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the total number of available services.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 919, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of users who do not have a first notification of loss record.", "output": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of users who do not have a first notification of loss record.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 920, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customers do not have a first notification of loss record? Give me the customer names.", "output": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customers do not have a first notification of loss record? Give me the customer names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 921, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of customers who have used either the service \"Close a policy\" or the service \"Upgrade a policy\".", "output": "SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = \"Close a policy\" OR t3.service_name = \"Upgrade a policy\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of customers who have used either the service \"Close a policy\" or the service \"Upgrade a policy\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 922, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customers have used the service named \"Close a policy\" or \"Upgrade a policy\"? Give me the customer names.", "output": "SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = \"Close a policy\" OR t3.service_name = \"Upgrade a policy\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customers have used the service named \"Close a policy\" or \"Upgrade a policy\"? Give me the customer names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 923, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of customers who have used both the service \"Close a policy\" and the service \"New policy application\".", "output": "SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = \"Close a policy\" INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = \"New policy application\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of customers who have used both the service \"Close a policy\" and the service \"New policy application\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 924, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customers have used both the service named \"Close a policy\" and the service named \"Upgrade a policy\"? Give me the customer names.", "output": "SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = \"Close a policy\" INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = \"New policy application\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customers have used both the service named \"Close a policy\" and the service named \"Upgrade a policy\"? Give me the customer names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 925, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the IDs of customers whose name contains \"Diana\".", "output": "SELECT customer_id FROM customers WHERE customer_name LIKE \"%Diana%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the IDs of customers whose name contains \"Diana\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 926, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the IDs of customers who have \"Diana\" in part of their names?", "output": "SELECT customer_id FROM customers WHERE customer_name LIKE \"%Diana%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the IDs of customers who have \"Diana\" in part of their names?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 927, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum and minimum settlement amount on record?", "output": "SELECT max(settlement_amount) , min(settlement_amount) FROM settlements", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum and minimum settlement amount on record?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 928, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the maximum and minimum settlement amount.", "output": "SELECT max(settlement_amount) , min(settlement_amount) FROM settlements", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the maximum and minimum settlement amount.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 929, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the customers in increasing order of IDs.", "output": "SELECT customer_id , customer_name FROM customers ORDER BY customer_id ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the customers in increasing order of IDs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 930, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the ordered list of customer ids?", "output": "SELECT customer_id , customer_name FROM customers ORDER BY customer_id ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the ordered list of customer ids?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 931, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Retrieve the open and close dates of all the policies associated with the customer whose name contains \"Diana\"", "output": "SELECT t2.date_opened , t2.date_closed FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name LIKE \"%Diana%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Retrieve the open and close dates of all the policies associated with the customer whose name contains \"Diana\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_fnol", "id": 932, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the open and close dates of all the policies used by the customer who have \"Diana\" in part of their names?", "output": "SELECT t2.date_opened , t2.date_closed FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name LIKE \"%Diana%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the open and close dates of all the policies used by the customer who have \"Diana\" in part of their names?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 933, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many kinds of enzymes are there?", "output": "SELECT count(*) FROM enzyme", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: How many kinds of enzymes are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 934, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total count of enzymes?", "output": "SELECT count(*) FROM enzyme", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What is the total count of enzymes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 935, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of enzymes in descending lexicographical order.", "output": "SELECT name FROM enzyme ORDER BY name DESC", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: List the name of enzymes in descending lexicographical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 936, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of enzymes in descending order?", "output": "SELECT name FROM enzyme ORDER BY name DESC", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the names of enzymes in descending order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 937, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names and the locations that the enzymes can make an effect.", "output": "SELECT name , LOCATION FROM enzyme", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: List the names and the locations that the enzymes can make an effect.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 938, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and locations of all enzymes listed?", "output": "SELECT name , LOCATION FROM enzyme", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the names and locations of all enzymes listed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 939, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes?", "output": "SELECT max(OMIM) FROM enzyme", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 940, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum OMIM value in the database?", "output": "SELECT max(OMIM) FROM enzyme", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What is the maximum OMIM value in the database?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 941, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'?", "output": "SELECT product , chromosome , porphyria FROM enzyme WHERE LOCATION = 'Cytosol'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 942, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the product, chromosome, and porphyria of the enzymes located at 'Cytosol'?", "output": "SELECT product , chromosome , porphyria FROM enzyme WHERE LOCATION = 'Cytosol'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What is the product, chromosome, and porphyria of the enzymes located at 'Cytosol'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 943, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of enzymes who does not produce 'Heme'?", "output": "SELECT name FROM enzyme WHERE product != 'Heme'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the names of enzymes who does not produce 'Heme'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 944, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of enzymes whose product is not 'Heme'?", "output": "SELECT name FROM enzyme WHERE product != 'Heme'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the names of enzymes whose product is not 'Heme'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 945, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and trade names of the medicines which has 'Yes' value in the FDA record?", "output": "SELECT name , trade_name FROM medicine WHERE FDA_approved = 'Yes'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the names and trade names of the medicines which has 'Yes' value in the FDA record?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 946, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and trade names of the medcines that are FDA approved?", "output": "SELECT name , trade_name FROM medicine WHERE FDA_approved = 'Yes'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the names and trade names of the medcines that are FDA approved?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 947, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'?", "output": "SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id = T3.id WHERE T3.name = 'Amisulpride' AND T2.interaction_type = 'inhibitor'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 948, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the enzymes used in the medicine Amisulpride that acts as inhibitors?", "output": "SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id = T3.id WHERE T3.name = 'Amisulpride' AND T2.interaction_type = 'inhibitor'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the names of the enzymes used in the medicine Amisulpride that acts as inhibitors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 949, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and names of the medicine that can interact with two or more enzymes?", "output": "SELECT T1.id , T1.Name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the ids and names of the medicine that can interact with two or more enzymes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 950, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For every medicine id, what are the names of the medicines that can interact with more than one enzyme?", "output": "SELECT T1.id , T1.Name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: For every medicine id, what are the names of the medicines that can interact with more than one enzyme?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 951, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids, names and FDA approval status of medicines in descending order of the number of enzymes that it can interact with.", "output": "SELECT T1.id , T1.Name , T1.FDA_approved FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id ORDER BY count(*) DESC", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the ids, names and FDA approval status of medicines in descending order of the number of enzymes that it can interact with.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 952, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids, names, and FDA approval status for medicines ordered by descending number of possible enzyme interactions?", "output": "SELECT T1.id , T1.Name , T1.FDA_approved FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id ORDER BY count(*) DESC", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the ids, names, and FDA approval status for medicines ordered by descending number of possible enzyme interactions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 953, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id and name of the enzyme with most number of medicines that can interact as 'activator'?", "output": "SELECT T1.id , T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id WHERE T2.interaction_type = 'activitor' GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What is the id and name of the enzyme with most number of medicines that can interact as 'activator'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 954, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id and name of the enzyme that can interact with the most medicines as an activator?", "output": "SELECT T1.id , T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id WHERE T2.interaction_type = 'activitor' GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What is the id and name of the enzyme that can interact with the most medicines as an activator?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 955, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?", "output": "SELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id = T2.id JOIN enzyme AS T3 ON T1.enzyme_id = T3.id WHERE T3.name = 'ALA synthase' AND T2.name = 'Aripiprazole'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 956, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the type of interaction for the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?", "output": "SELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id = T2.id JOIN enzyme AS T3 ON T1.enzyme_id = T3.id WHERE T3.name = 'ALA synthase' AND T2.name = 'Aripiprazole'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What is the type of interaction for the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 957, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most common interaction type between enzymes and medicine? And how many are there?", "output": "SELECT interaction_type , count(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What is the most common interaction type between enzymes and medicine? And how many are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 958, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the most common types of interactions between enzymes and medicine, and how many types are there?", "output": "SELECT interaction_type , count(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the most common types of interactions between enzymes and medicine, and how many types are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 959, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many medicines have the FDA approval status 'No' ?", "output": "SELECT count(*) FROM medicine WHERE FDA_approved = 'No'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: How many medicines have the FDA approval status 'No' ?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 960, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many medicines were not approved by the FDA?", "output": "SELECT count(*) FROM medicine WHERE FDA_approved = 'No'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: How many medicines were not approved by the FDA?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 961, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many enzymes do not have any interactions?", "output": "SELECT count(*) FROM enzyme WHERE id NOT IN ( SELECT enzyme_id FROM medicine_enzyme_interaction );", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: How many enzymes do not have any interactions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 962, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the count of enzymes without any interactions?", "output": "SELECT count(*) FROM enzyme WHERE id NOT IN ( SELECT enzyme_id FROM medicine_enzyme_interaction );", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What is the count of enzymes without any interactions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 963, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id and trade name of the medicines can interact with at least 3 enzymes?", "output": "SELECT T1.id , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 3", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What is the id and trade name of the medicines can interact with at least 3 enzymes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 964, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and trade names of the medicine that can interact with at least 3 enzymes?", "output": "SELECT T1.id , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 3", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the ids and trade names of the medicine that can interact with at least 3 enzymes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 965, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct name, location and products of the enzymes which has any 'inhibitor' interaction?", "output": "SELECT DISTINCT T1.name , T1.location , T1.product FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.enzyme_id = T1.id WHERE T2.interaction_type = 'inhibitor'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the distinct name, location and products of the enzymes which has any 'inhibitor' interaction?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 966, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different names, locations, and products of the enzymes that are capable inhibitor interactions?", "output": "SELECT DISTINCT T1.name , T1.location , T1.product FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.enzyme_id = T1.id WHERE T2.interaction_type = 'inhibitor'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the different names, locations, and products of the enzymes that are capable inhibitor interactions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 967, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes.", "output": "SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'inhibitor' INTERSECT SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'activitor'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 968, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the medicine and trade names that can interact as an inhibitor and activitor with enzymes?", "output": "SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'inhibitor' INTERSECT SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id WHERE interaction_type = 'activitor'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the medicine and trade names that can interact as an inhibitor and activitor with enzymes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 969, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'.", "output": "SELECT name , trade_name FROM medicine EXCEPT SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id JOIN enzyme AS T3 ON T3.id = T2.enzyme_id WHERE T3.product = 'Protoporphyrinogen IX'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 970, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'?", "output": "SELECT name , trade_name FROM medicine EXCEPT SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id JOIN enzyme AS T3 ON T3.id = T2.enzyme_id WHERE T3.product = 'Protoporphyrinogen IX'", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 971, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct FDA approval statuses are there for the medicines?", "output": "SELECT count(DISTINCT FDA_approved) FROM medicine", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: How many distinct FDA approval statuses are there for the medicines?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 972, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different FDA approval statuses exist for medicines?", "output": "SELECT count(DISTINCT FDA_approved) FROM medicine", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: How many different FDA approval statuses exist for medicines?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 973, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which enzyme names have the substring \"ALA\"?", "output": "SELECT name FROM enzyme WHERE name LIKE \"%ALA%\"", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: Which enzyme names have the substring \"ALA\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 974, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of enzymes that include the string 'ALA'?", "output": "SELECT name FROM enzyme WHERE name LIKE \"%ALA%\"", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: What are the names of enzymes that include the string 'ALA'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 975, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the number of medicines offered by each trade.", "output": "SELECT trade_name , count(*) FROM medicine GROUP BY trade_name", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: find the number of medicines offered by each trade.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "medicine_enzyme_interaction", "id": 976, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many medicines are offered by each trade name?", "output": "SELECT trade_name , count(*) FROM medicine GROUP BY trade_name", "input": "Based on \n# the table&column(database schema) information {'medicine': ['id', 'name', 'Trade_Name', 'FDA_approved'], 'enzyme': ['id', 'name', 'Location', 'Product', 'Chromosome', 'OMIM', 'Porphyria'], 'medicine_enzyme_interaction': ['enzyme_id', 'medicine_id', 'interaction_type']} and \n# the user question: How many medicines are offered by each trade name?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 977, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all schools and their nicknames in the order of founded year.", "output": "SELECT school , nickname FROM university ORDER BY founded", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all schools and their nicknames in the order of founded year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 978, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different schools and their nicknames, ordered by their founding years?", "output": "SELECT school , nickname FROM university ORDER BY founded", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different schools and their nicknames, ordered by their founding years?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 979, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all public schools and their locations.", "output": "SELECT school , LOCATION FROM university WHERE affiliation = 'Public'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all public schools and their locations.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 980, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the public schools and what are their locations?", "output": "SELECT school , LOCATION FROM university WHERE affiliation = 'Public'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the public schools and what are their locations?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 981, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When was the school with the largest enrollment founded?", "output": "SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When was the school with the largest enrollment founded?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 982, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the founded year for the school with the largest enrollment.", "output": "SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the founded year for the school with the largest enrollment.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 983, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the founded year of the newest non public school.", "output": "SELECT founded FROM university WHERE affiliation != 'Public' ORDER BY founded DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the founded year of the newest non public school.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 984, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the founded year of the non public school that was founded most recently?", "output": "SELECT founded FROM university WHERE affiliation != 'Public' ORDER BY founded DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the founded year of the non public school that was founded most recently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 985, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many schools are in the basketball match?", "output": "SELECT count(DISTINCT school_id) FROM basketball_match", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many schools are in the basketball match?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 986, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of schools that have had basketball matches.", "output": "SELECT count(DISTINCT school_id) FROM basketball_match", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of schools that have had basketball matches.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 987, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the highest acc percent score in the competition?", "output": "SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the highest acc percent score in the competition?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 988, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the highest acc percent across all basketball matches.", "output": "SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the highest acc percent across all basketball matches.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 989, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the primary conference of the school that has the lowest acc percent score in the competition?", "output": "SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t2.acc_percent LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the primary conference of the school that has the lowest acc percent score in the competition?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 990, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the primary conference of the school with the lowest acc percentage score.", "output": "SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t2.acc_percent LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the primary conference of the school with the lowest acc percentage score.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 991, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the team name and acc regular season score of the school that was founded for the longest time?", "output": "SELECT t2.team_name , t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t1.founded LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the team name and acc regular season score of the school that was founded for the longest time?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 992, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name of the team and the acc during the regular season for the school that was founded the earliest.", "output": "SELECT t2.team_name , t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t1.founded LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the name of the team and the acc during the regular season for the school that was founded the earliest.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 993, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the location and all games score of the school that has Clemson as its team name.", "output": "SELECT t2.All_Games , t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the location and all games score of the school that has Clemson as its team name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 994, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the all games score and location of the school called Clemson?", "output": "SELECT t2.All_Games , t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the all games score and location of the school called Clemson?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 995, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average enrollment size of the universities that are founded before 1850?", "output": "SELECT avg(enrollment) FROM university WHERE founded < 1850", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the average enrollment size of the universities that are founded before 1850?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 996, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the average enrollment of universities founded before 1850.", "output": "SELECT avg(enrollment) FROM university WHERE founded < 1850", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the average enrollment of universities founded before 1850.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 997, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the enrollment and primary_conference of the oldest college.", "output": "SELECT enrollment , primary_conference FROM university ORDER BY founded LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the enrollment and primary_conference of the oldest college.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 998, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the enrollment and primary conference for the university which was founded the earliest?", "output": "SELECT enrollment , primary_conference FROM university ORDER BY founded LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the enrollment and primary conference for the university which was founded the earliest?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 999, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total and minimum enrollment of all schools?", "output": "SELECT sum(enrollment) , min(enrollment) FROM university", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total and minimum enrollment of all schools?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1000, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the total and minimum enrollments across all schools.", "output": "SELECT sum(enrollment) , min(enrollment) FROM university", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the total and minimum enrollments across all schools.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1001, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total student enrollment for different affiliation type schools.", "output": "SELECT sum(enrollment) , affiliation FROM university GROUP BY affiliation", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total student enrollment for different affiliation type schools.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1002, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the total enrollments of universities of each affiliation type?", "output": "SELECT sum(enrollment) , affiliation FROM university GROUP BY affiliation", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the total enrollments of universities of each affiliation type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1003, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many schools do not participate in the basketball match?", "output": "SELECT count(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many schools do not participate in the basketball match?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1004, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of universities that do not participate in the baketball match.", "output": "SELECT count(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of universities that do not participate in the baketball match.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1005, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the schools that were either founded after 1850 or public.", "output": "SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the schools that were either founded after 1850 or public.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1006, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the schools that were either founded before 1850 or are public?", "output": "SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the schools that were either founded before 1850 or are public?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1007, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find how many different affiliation types there are.", "output": "SELECT count(DISTINCT affiliation) FROM university", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find how many different affiliation types there are.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1008, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different affiliation types.", "output": "SELECT count(DISTINCT affiliation) FROM university", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of different affiliation types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1009, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find how many school locations have the word 'NY'.", "output": "SELECT count(*) FROM university WHERE LOCATION LIKE \"%NY%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find how many school locations have the word 'NY'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1010, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many universities have a location that contains NY?", "output": "SELECT count(*) FROM university WHERE LOCATION LIKE \"%NY%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many universities have a location that contains NY?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1011, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the team names of the universities whose enrollments are smaller than the average enrollment size.", "output": "SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE enrollment < (SELECT avg(enrollment) FROM university)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the team names of the universities whose enrollments are smaller than the average enrollment size.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1012, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of teams from universities that have a below average enrollment?", "output": "SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE enrollment < (SELECT avg(enrollment) FROM university)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of teams from universities that have a below average enrollment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1013, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of universities that have over a 20000 enrollment size for each affiliation type.", "output": "SELECT count(*) , affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of universities that have over a 20000 enrollment size for each affiliation type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1014, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different affiliations, and how many schools with each have an enrollment size of above 20000?", "output": "SELECT count(*) , affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different affiliations, and how many schools with each have an enrollment size of above 20000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1015, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type.", "output": "SELECT sum(Enrollment) , affiliation FROM university WHERE founded > 1850 GROUP BY affiliation", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1016, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type?", "output": "SELECT sum(Enrollment) , affiliation FROM university WHERE founded > 1850 GROUP BY affiliation", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1017, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum enrollment across all schools?", "output": "SELECT max(Enrollment) FROM university", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the maximum enrollment across all schools?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1018, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the maximum enrollment across all schools.", "output": "SELECT max(Enrollment) FROM university", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the maximum enrollment across all schools.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1019, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all information regarding the basketball match.", "output": "SELECT * FROM basketball_match", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all information regarding the basketball match.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1020, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is all the information about the basketball match?", "output": "SELECT * FROM basketball_match", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is all the information about the basketball match?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1021, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List names of all teams in the basketball competition, ordered by all home scores in descending order.", "output": "SELECT team_name FROM basketball_match ORDER BY All_Home DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List names of all teams in the basketball competition, ordered by all home scores in descending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "university_basketball", "id": 1022, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the teams in the basketball competition, sorted by all home scores in descending order?", "output": "SELECT team_name FROM basketball_match ORDER BY All_Home DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the teams in the basketball competition, sorted by all home scores in descending order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1023, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "the names of models that launched between 2002 and 2004.", "output": "SELECT Model_name FROM chip_model WHERE Launch_year BETWEEN 2002 AND 2004;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: the names of models that launched between 2002 and 2004.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1024, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which model has the least amount of RAM? List the model name and the amount of RAM.", "output": "SELECT Model_name , RAM_MiB FROM chip_model ORDER BY RAM_MiB ASC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which model has the least amount of RAM? List the model name and the amount of RAM.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1025, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the chip model and screen mode of the phone with hardware model name \"LG-P760\"?", "output": "SELECT chip_model , screen_mode FROM phone WHERE Hardware_Model_name = \"LG-P760\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the chip model and screen mode of the phone with hardware model name \"LG-P760\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1026, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many phone hardware models are produced by the company named \"Nokia Corporation\"?", "output": "SELECT count(*) FROM phone WHERE Company_name = \"Nokia Corporation\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many phone hardware models are produced by the company named \"Nokia Corporation\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1027, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is maximum and minimum RAM size of phone produced by company named \"Nokia Corporation\"?", "output": "SELECT max(T1.RAM_MiB) , min(T1.RAM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = \"Nokia Corporation\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is maximum and minimum RAM size of phone produced by company named \"Nokia Corporation\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1028, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average ROM size of phones produced by the company named \"Nokia Corporation\"?", "output": "SELECT avg(T1.ROM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = \"Nokia Corporation\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average ROM size of phones produced by the company named \"Nokia Corporation\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1029, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T2.Hardware_Model_name , T2.Company_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year = 2002 OR T1.RAM_MiB > 32;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1030, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.", "output": "SELECT Hardware_Model_name , Company_name FROM phone WHERE Accreditation_type LIKE 'Full';", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1031, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is \"LG-P760\".", "output": "SELECT T1.Char_cells , T1.Pixels , T1.Hardware_colours FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T2.Hardware_Model_name = \"LG-P760\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is \"LG-P760\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1032, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the hardware model name and company name for the phone whose screen mode type is \"Graphics.\"", "output": "SELECT T2.Hardware_Model_name , T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = \"Graphics\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the hardware model name and company name for the phone whose screen mode type is \"Graphics.\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1033, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT Company_name , count(*) FROM phone GROUP BY Company_name ORDER BY count(*) ASC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1034, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of the company that produced more than one phone model.", "output": "SELECT Company_name FROM phone GROUP BY Company_name HAVING count(*) > 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of the company that produced more than one phone model.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1035, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the maximum, minimum and average number of used kb in screen mode.", "output": "SELECT max(used_kb) , min(used_kb) , avg(used_kb) FROM screen_mode;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the maximum, minimum and average number of used kb in screen mode.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1036, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of the phone model launched in year 2002 and with the highest RAM size.", "output": "SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year = 2002 ORDER BY T1.RAM_MiB DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of the phone model launched in year 2002 and with the highest RAM size.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1037, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the wifi and screen mode type of the hardware model named \"LG-P760\"?", "output": "SELECT T1.WiFi , T3.Type FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T2.Hardware_Model_name = \"LG-P760\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the wifi and screen mode type of the hardware model named \"LG-P760\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1038, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the hardware model name for the phones that have screen mode type \"Text\" or RAM size greater than 32.", "output": "SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T3.Type = \"Text\" OR T1.RAM_MiB > 32;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the hardware model name for the phones that have screen mode type \"Text\" or RAM size greater than 32.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1039, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the hardware model name for the phones that were produced by \"Nokia Corporation\" or whose screen mode type is \"Graphics.\"", "output": "SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = \"Graphics\" OR t2.Company_name = \"Nokia Corporation\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the hardware model name for the phones that were produced by \"Nokia Corporation\" or whose screen mode type is \"Graphics.\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1040, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the hardware model name for the phons that were produced by \"Nokia Corporation\" but whose screen mode type is not Text.", "output": "SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE t2.Company_name = \"Nokia Corporation\" AND T1.Type != \"Text\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the hardware model name for the phons that were produced by \"Nokia Corporation\" but whose screen mode type is not Text.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1041, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15.", "output": "SELECT DISTINCT T2.Hardware_Model_name , T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.used_kb BETWEEN 10 AND 15;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1042, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of phones for each accreditation type.", "output": "SELECT Accreditation_type , count(*) FROM phone GROUP BY Accreditation_type", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of phones for each accreditation type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1043, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many phones belongs to each accreditation type?", "output": "SELECT Accreditation_type , count(*) FROM phone GROUP BY Accreditation_type", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many phones belongs to each accreditation type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1044, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the accreditation level that more than 3 phones use.", "output": "SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING count(*) > 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the accreditation level that more than 3 phones use.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1045, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the details for all chip models.", "output": "SELECT * FROM chip_model", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the details for all chip models.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1046, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many models do not have the wifi function?", "output": "SELECT count(*) FROM chip_model WHERE wifi = 'No'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many models do not have the wifi function?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1047, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of chip model that do not have wifi.", "output": "SELECT count(*) FROM chip_model WHERE wifi = 'No'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of chip model that do not have wifi.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1048, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the model names sorted by their launch year.", "output": "SELECT model_name FROM chip_model ORDER BY launch_year", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the model names sorted by their launch year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1049, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average ram mib size of the chip models that are never used by any phone.", "output": "SELECT avg(RAM_MiB) FROM chip_model WHERE model_name NOT IN (SELECT chip_model FROM phone)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average ram mib size of the chip models that are never used by any phone.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1050, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the chip models that are not used by any phone with full accreditation type.", "output": "SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type = 'Full'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the chip models that are not used by any phone with full accreditation type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_1", "id": 1051, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types.", "output": "SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Provisional' INTERSECT SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Full'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1052, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many countries are there in total?", "output": "SELECT count(*) FROM country", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many countries are there in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1053, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of countries.", "output": "SELECT count(*) FROM country", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of countries.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1054, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the country name and capital of all countries.", "output": "SELECT Country_name , Capital FROM country", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the country name and capital of all countries.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1055, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and capitals of each country?", "output": "SELECT Country_name , Capital FROM country", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and capitals of each country?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1056, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all official native languages that contain the word \"English\".", "output": "SELECT Official_native_language FROM country WHERE Official_native_language LIKE \"%English%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all official native languages that contain the word \"English\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1057, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the official native languages that contain the string \"English\".", "output": "SELECT Official_native_language FROM country WHERE Official_native_language LIKE \"%English%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the official native languages that contain the string \"English\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1058, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all distinct positions of matches.", "output": "SELECT DISTINCT POSITION FROM match_season", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all distinct positions of matches.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1059, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different positions for match season?", "output": "SELECT DISTINCT POSITION FROM match_season", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different positions for match season?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1060, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the players from college UCLA.", "output": "SELECT Player FROM match_season WHERE College = \"UCLA\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the players from college UCLA.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1061, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the players from UCLA?", "output": "SELECT Player FROM match_season WHERE College = \"UCLA\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who are the players from UCLA?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1062, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the distinct position of players from college UCLA or Duke.", "output": "SELECT DISTINCT POSITION FROM match_season WHERE College = \"UCLA\" OR College = \"Duke\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the distinct position of players from college UCLA or Duke.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1063, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different positions of players from UCLA or Duke colleges?", "output": "SELECT DISTINCT POSITION FROM match_season WHERE College = \"UCLA\" OR College = \"Duke\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different positions of players from UCLA or Duke colleges?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1064, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the draft pick numbers and draft classes of players whose positions are defenders.", "output": "SELECT Draft_Pick_Number , Draft_Class FROM match_season WHERE POSITION = \"Defender\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the draft pick numbers and draft classes of players whose positions are defenders.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1065, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the draft pick numbers and draft classes for players who play the Defender position?", "output": "SELECT Draft_Pick_Number , Draft_Class FROM match_season WHERE POSITION = \"Defender\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the draft pick numbers and draft classes for players who play the Defender position?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1066, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct teams are involved in match seasons?", "output": "SELECT count(DISTINCT Team) FROM match_season", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct teams are involved in match seasons?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1067, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different teams involved in match season.", "output": "SELECT count(DISTINCT Team) FROM match_season", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of different teams involved in match season.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1068, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the players and the years played.", "output": "SELECT Player , Years_Played FROM player", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the players and the years played.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1069, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the different players and how many years has each played?", "output": "SELECT Player , Years_Played FROM player", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who are the different players and how many years has each played?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1070, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all team names.", "output": "SELECT Name FROM Team", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all team names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1071, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all teams?", "output": "SELECT Name FROM Team", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all teams?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1072, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the season, the player, and the name of the country that player belongs to.", "output": "SELECT T2.Season , T2.Player , T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the season, the player, and the name of the country that player belongs to.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1073, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each player, what are their name, season, and country that they belong to?", "output": "SELECT T2.Season , T2.Player , T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each player, what are their name, season, and country that they belong to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1074, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which players are from Indonesia?", "output": "SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = \"Indonesia\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which players are from Indonesia?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1075, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the players from Indonesia?", "output": "SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = \"Indonesia\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who are the players from Indonesia?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1076, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct positions of the players from a country whose capital is Dublin?", "output": "SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = \"Dublin\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct positions of the players from a country whose capital is Dublin?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1077, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the different positions of players who play for the country with the capital Dublin.", "output": "SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = \"Dublin\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the different positions of players who play for the country with the capital Dublin.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1078, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the official languages of the countries of players from Maryland or Duke college?", "output": "SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = \"Maryland\" OR T2.College = \"Duke\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the official languages of the countries of players from Maryland or Duke college?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1079, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the official native languages of countries who have players from Maryland or Duke colleges.", "output": "SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = \"Maryland\" OR T2.College = \"Duke\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the official native languages of countries who have players from Maryland or Duke colleges.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1080, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct official languages are there among countries of players whose positions are defenders.", "output": "SELECT count(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Defender\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct official languages are there among countries of players whose positions are defenders.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1081, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different official languages corresponding to countries that players who play Defender are from.", "output": "SELECT count(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Defender\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of different official languages corresponding to countries that players who play Defender are from.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1082, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the season, the player, and the name of the team that players belong to.", "output": "SELECT T1.Season , T1.Player , T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the season, the player, and the name of the team that players belong to.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1083, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the different players, what season do they play in, and what is the name of the team they are on?", "output": "SELECT T1.Season , T1.Player , T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who are the different players, what season do they play in, and what is the name of the team they are on?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1084, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the positions of the players from the team with name \"Ryley Goldner\".", "output": "SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = \"Ryley Goldner\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the positions of the players from the team with name \"Ryley Goldner\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1085, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the positions of players on the team Ryley Goldner.", "output": "SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = \"Ryley Goldner\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the positions of players on the team Ryley Goldner.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1086, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct colleges are associated with players from the team with name \"Columbus Crew\".", "output": "SELECT count(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = \"Columbus Crew\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct colleges are associated with players from the team with name \"Columbus Crew\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1087, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different colleges that players who play for Columbus Crew are from.", "output": "SELECT count(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = \"Columbus Crew\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of different colleges that players who play for Columbus Crew are from.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1088, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the players and years played for players from team \"Columbus Crew\".", "output": "SELECT T1.Player , T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = \"Columbus Crew\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the players and years played for players from team \"Columbus Crew\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1089, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the players who played for Columbus Crew, and how many years did each play for?", "output": "SELECT T1.Player , T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = \"Columbus Crew\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the players who played for Columbus Crew, and how many years did each play for?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1090, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the position of players and the corresponding number of players.", "output": "SELECT POSITION , COUNT(*) FROM match_season GROUP BY POSITION", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the position of players and the corresponding number of players.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1091, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many players played each position?", "output": "SELECT POSITION , COUNT(*) FROM match_season GROUP BY POSITION", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many players played each position?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1092, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the country names and the corresponding number of players.", "output": "SELECT Country_name , COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the country names and the corresponding number of players.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1093, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many players are from each country?", "output": "SELECT Country_name , COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many players are from each country?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1094, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return all players sorted by college in ascending alphabetical order.", "output": "SELECT player FROM match_season ORDER BY College ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return all players sorted by college in ascending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1095, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the players who played in match season, sorted by college in ascending alphabetical order?", "output": "SELECT player FROM match_season ORDER BY College ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the players who played in match season, sorted by college in ascending alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1096, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the most common position of players in match seasons.", "output": "SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the most common position of players in match seasons.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1097, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the position that is most common among players in match seasons?", "output": "SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the position that is most common among players in match seasons?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1098, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the top 3 most common colleges of players in match seasons.", "output": "SELECT College FROM match_season GROUP BY College ORDER BY count(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the top 3 most common colleges of players in match seasons.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1099, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the three colleges from which the most players are from?", "output": "SELECT College FROM match_season GROUP BY College ORDER BY count(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the three colleges from which the most players are from?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1100, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of colleges that have at least two players.", "output": "SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name of colleges that have at least two players.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1101, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all colleges that have two or more players?", "output": "SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all colleges that have two or more players?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1102, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of colleges that have at least two players in descending alphabetical order.", "output": "SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2 ORDER BY College DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name of colleges that have at least two players in descending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1103, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of colleges that have two or more players, listed in descending alphabetical order?", "output": "SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2 ORDER BY College DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of colleges that have two or more players, listed in descending alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1104, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of teams that do no have match season record?", "output": "SELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of teams that do no have match season record?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1105, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of teams that have no match season record.", "output": "SELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names of teams that have no match season record.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1106, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of countries that have both players with position forward and players with position defender?", "output": "SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Forward\" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Defender\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of countries that have both players with position forward and players with position defender?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1107, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of countries that have players that play the Forward position, as well as players who play the Defender position.", "output": "SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Forward\" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Defender\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names of countries that have players that play the Forward position, as well as players who play the Defender position.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1108, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which college have both players with position midfielder and players with position defender?", "output": "SELECT College FROM match_season WHERE POSITION = \"Midfielder\" INTERSECT SELECT College FROM match_season WHERE POSITION = \"Defender\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which college have both players with position midfielder and players with position defender?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "match_season", "id": 1109, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the colleges that have players who play the Midfielder position, as well as players who play the Defender position.", "output": "SELECT College FROM match_season WHERE POSITION = \"Midfielder\" INTERSECT SELECT College FROM match_season WHERE POSITION = \"Defender\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the colleges that have players who play the Midfielder position, as well as players who play the Defender position.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1110, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many climbers are there?", "output": "SELECT count(*) FROM climber", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: How many climbers are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1111, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of climbers.", "output": "SELECT count(*) FROM climber", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: Count the number of climbers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1112, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of climbers in descending order of points.", "output": "SELECT Name FROM climber ORDER BY Points DESC", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: List the names of climbers in descending order of points.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1113, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the climbers, ordered by points descending?", "output": "SELECT Name FROM climber ORDER BY Points DESC", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: What are the names of the climbers, ordered by points descending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1114, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of climbers whose country is not Switzerland.", "output": "SELECT Name FROM climber WHERE Country != \"Switzerland\"", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: List the names of climbers whose country is not Switzerland.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1115, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of climbers who are not from the country of Switzerland?", "output": "SELECT Name FROM climber WHERE Country != \"Switzerland\"", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: What are the names of climbers who are not from the country of Switzerland?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1116, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum point for climbers whose country is United Kingdom?", "output": "SELECT max(Points) FROM climber WHERE Country = \"United Kingdom\"", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: What is the maximum point for climbers whose country is United Kingdom?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1117, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the maximum number of points for climbers from the United Kingdom.", "output": "SELECT max(Points) FROM climber WHERE Country = \"United Kingdom\"", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: Return the maximum number of points for climbers from the United Kingdom.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1118, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct countries are the climbers from?", "output": "SELECT COUNT(DISTINCT Country) FROM climber", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: How many distinct countries are the climbers from?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1119, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different countries that climbers are from.", "output": "SELECT COUNT(DISTINCT Country) FROM climber", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: Count the number of different countries that climbers are from.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1120, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of mountains in ascending alphabetical order?", "output": "SELECT Name FROM mountain ORDER BY Name ASC", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: What are the names of mountains in ascending alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1121, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the names of mountains in alphabetical order.", "output": "SELECT Name FROM mountain ORDER BY Name ASC", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: Give the names of mountains in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1122, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the countries of mountains with height bigger than 5000?", "output": "SELECT Country FROM mountain WHERE Height > 5000", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: What are the countries of mountains with height bigger than 5000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1123, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the countries of the mountains that have a height larger than 5000.", "output": "SELECT Country FROM mountain WHERE Height > 5000", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: Return the countries of the mountains that have a height larger than 5000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1124, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the highest mountain?", "output": "SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: What is the name of the highest mountain?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1125, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name of the mountain with the greatest height.", "output": "SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: Return the name of the mountain with the greatest height.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1126, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the distinct ranges of the mountains with the top 3 prominence.", "output": "SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: List the distinct ranges of the mountains with the top 3 prominence.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1127, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different ranges of the 3 mountains with the highest prominence?", "output": "SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: What are the different ranges of the 3 mountains with the highest prominence?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1128, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names of climbers and the names of mountains they climb.", "output": "SELECT T1.Name , T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: Show names of climbers and the names of mountains they climb.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1129, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of climbers and the corresponding names of mountains that they climb?", "output": "SELECT T1.Name , T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: What are the names of climbers and the corresponding names of mountains that they climb?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1130, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of climbers and the heights of mountains they climb.", "output": "SELECT T1.Name , T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: Show the names of climbers and the heights of mountains they climb.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1131, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of climbers and the corresponding heights of the mountains that they climb?", "output": "SELECT T1.Name , T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: What are the names of climbers and the corresponding heights of the mountains that they climb?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1132, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the height of the mountain climbed by the climber with the maximum points.", "output": "SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: Show the height of the mountain climbed by the climber with the maximum points.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1133, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the height of the mountain climbined by the climbing who had the most points?", "output": "SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: What is the height of the mountain climbined by the climbing who had the most points?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1134, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the distinct names of mountains climbed by climbers from country \"West Germany\".", "output": "SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = \"West Germany\"", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: Show the distinct names of mountains climbed by climbers from country \"West Germany\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1135, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different names of mountains ascended by climbers from the country of West Germany?", "output": "SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = \"West Germany\"", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: What are the different names of mountains ascended by climbers from the country of West Germany?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1136, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the times used by climbers to climb mountains in Country Uganda.", "output": "SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = \"Uganda\"", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: Show the times used by climbers to climb mountains in Country Uganda.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1137, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the times used by climbers who climbed mountains in the country of Uganda?", "output": "SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = \"Uganda\"", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: What are the times used by climbers who climbed mountains in the country of Uganda?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1138, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the countries and the number of climbers from each country.", "output": "SELECT Country , COUNT(*) FROM climber GROUP BY Country", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: Please show the countries and the number of climbers from each country.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1139, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many climbers are from each country?", "output": "SELECT Country , COUNT(*) FROM climber GROUP BY Country", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: How many climbers are from each country?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1140, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the countries that have more than one mountain.", "output": "SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: List the countries that have more than one mountain.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1141, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which countries have more than one mountain?", "output": "SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: Which countries have more than one mountain?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1142, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of mountains that do not have any climber.", "output": "SELECT Name FROM mountain WHERE Mountain_ID NOT IN (SELECT Mountain_ID FROM climber)", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: List the names of mountains that do not have any climber.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1143, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of countains that no climber has climbed?", "output": "SELECT Name FROM mountain WHERE Mountain_ID NOT IN (SELECT Mountain_ID FROM climber)", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: What are the names of countains that no climber has climbed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1144, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200.", "output": "SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1145, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the countries that have both mountains that are higher than 5600 and lower than 5200?", "output": "SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: What are the countries that have both mountains that are higher than 5600 and lower than 5200?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1146, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the range that has the most number of mountains.", "output": "SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: Show the range that has the most number of mountains.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1147, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which range contains the most mountains?", "output": "SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: Which range contains the most mountains?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1148, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of mountains with height more than 5000 or prominence more than 1000.", "output": "SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: Show the names of mountains with height more than 5000 or prominence more than 1000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "climbing", "id": 1149, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of mountains that have a height of over 5000 or a prominence of over 1000?", "output": "SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000", "input": "Based on \n# the table&column(database schema) information {'mountain': ['Mountain_ID', 'Name', 'Height', 'Prominence', 'Range', 'Country'], 'climber': ['Climber_ID', 'Name', 'Country', 'Time', 'Points', 'Mountain_ID']} and \n# the user question: What are the names of mountains that have a height of over 5000 or a prominence of over 1000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1150, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many body builders are there?", "output": "SELECT count(*) FROM body_builder", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: How many body builders are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1151, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the total scores of body builders in ascending order.", "output": "SELECT Total FROM body_builder ORDER BY Total ASC", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: List the total scores of body builders in ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1152, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the snatch score and clean jerk score of body builders in ascending order of snatch score.", "output": "SELECT Snatch , Clean_Jerk FROM body_builder ORDER BY Snatch ASC", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: List the snatch score and clean jerk score of body builders in ascending order of snatch score.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1153, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average snatch score of body builders?", "output": "SELECT avg(Snatch) FROM body_builder", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: What is the average snatch score of body builders?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1154, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the clean and jerk score of the body builder with the highest total score?", "output": "SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: What are the clean and jerk score of the body builder with the highest total score?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1155, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the birthdays of people in ascending order of height?", "output": "SELECT Birth_Date FROM People ORDER BY Height ASC", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: What are the birthdays of people in ascending order of height?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1156, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of body builders?", "output": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: What are the names of body builders?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1157, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of body builders whose total score is higher than 300?", "output": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: What are the names of body builders whose total score is higher than 300?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1158, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the body builder with the greatest body weight?", "output": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: What is the name of the body builder with the greatest body weight?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1159, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the birth date and birth place of the body builder with the highest total points?", "output": "SELECT T2.Birth_Date , T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: What are the birth date and birth place of the body builder with the highest total points?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1160, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the heights of body builders with total score smaller than 315?", "output": "SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total < 315", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: What are the heights of body builders with total score smaller than 315?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1161, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average total score of body builders with height bigger than 200?", "output": "SELECT avg(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 200", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: What is the average total score of body builders with height bigger than 200?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1162, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of body builders in descending order of total scores?", "output": "SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: What are the names of body builders in descending order of total scores?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1163, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List each birth place along with the number of people from there.", "output": "SELECT Birth_Place , COUNT(*) FROM people GROUP BY Birth_Place", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: List each birth place along with the number of people from there.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1164, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most common birth place of people?", "output": "SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: What is the most common birth place of people?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1165, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the birth places that are shared by at least two people?", "output": "SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: What are the birth places that are shared by at least two people?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1166, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the height and weight of people in descending order of height.", "output": "SELECT Height , Weight FROM people ORDER BY Height DESC", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: List the height and weight of people in descending order of height.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1167, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all information about each body builder.", "output": "SELECT * FROM body_builder", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: Show all information about each body builder.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1168, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names and origins of people who are not body builders.", "output": "SELECT Name , birth_place FROM people EXCEPT SELECT T1.Name , T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id = T2.people_id", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: List the names and origins of people who are not body builders.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1169, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct birth places are there?", "output": "SELECT count(DISTINCT Birth_Place) FROM people", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: How many distinct birth places are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1170, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many persons are not body builders?", "output": "SELECT count(*) FROM people WHERE people_id NOT IN (SELECT People_ID FROM body_builder)", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: How many persons are not body builders?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1171, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200.", "output": "SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T1.snatch > 140 OR T2.height > 200;", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1172, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the total scores of the body builders whose birthday contains the string \"January\" ?", "output": "SELECT T1.total FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T2.Birth_Date LIKE \"%January%\";", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: What are the total scores of the body builders whose birthday contains the string \"January\" ?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "body_builder", "id": 1173, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the minimum snatch score?", "output": "SELECT min(snatch) FROM body_builder", "input": "Based on \n# the table&column(database schema) information {'body_builder': ['Body_Builder_ID', 'People_ID', 'Snatch', 'Clean_Jerk', 'Total'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Birth_Date', 'Birth_Place']} and \n# the user question: What is the minimum snatch score?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1174, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many elections are there?", "output": "SELECT count(*) FROM election", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: How many elections are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1175, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the votes of elections in descending order.", "output": "SELECT Votes FROM election ORDER BY Votes DESC", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: List the votes of elections in descending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1176, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the dates and vote percents of elections.", "output": "SELECT Date , Vote_Percent FROM election", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: List the dates and vote percents of elections.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1177, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the minimum and maximum vote percents of elections?", "output": "SELECT min(Vote_Percent) , max(Vote_Percent) FROM election", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: What are the minimum and maximum vote percents of elections?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1178, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and parties of representatives?", "output": "SELECT Name , Party FROM representative", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: What are the names and parties of representatives?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1179, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of representatives whose party is not \"Republican\"?", "output": "SELECT Name FROM Representative WHERE Party != \"Republican\"", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: What are the names of representatives whose party is not \"Republican\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1180, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the life spans of representatives from New York state or Indiana state?", "output": "SELECT Lifespan FROM representative WHERE State = \"New York\" OR State = \"Indiana\"", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: What are the life spans of representatives from New York state or Indiana state?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1181, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of representatives and the dates of elections they participated in.", "output": "SELECT T2.Name , T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: What are the names of representatives and the dates of elections they participated in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1182, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of representatives with more than 10000 votes in election?", "output": "SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE Votes > 10000", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: What are the names of representatives with more than 10000 votes in election?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1183, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of representatives in descending order of votes?", "output": "SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes DESC", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: What are the names of representatives in descending order of votes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1184, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the party of the representative that has the smallest number of votes.", "output": "SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: What is the party of the representative that has the smallest number of votes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1185, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the lifespans of representatives in descending order of vote percent?", "output": "SELECT T2.Lifespan FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY Vote_Percent DESC", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: What are the lifespans of representatives in descending order of vote percent?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1186, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of votes of representatives from party \"Republican\"?", "output": "SELECT avg(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE T2.Party = \"Republican\"", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: What is the average number of votes of representatives from party \"Republican\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1187, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different parties of representative? Show the party name and the number of representatives in each party.", "output": "SELECT Party , COUNT(*) FROM representative GROUP BY Party", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: What are the different parties of representative? Show the party name and the number of representatives in each party.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1188, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the party that has the largest number of representatives?", "output": "SELECT Party , COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: What is the party that has the largest number of representatives?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1189, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What parties have at least three representatives?", "output": "SELECT Party FROM representative GROUP BY Party HAVING COUNT(*) >= 3", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: What parties have at least three representatives?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1190, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What states have at least two representatives?", "output": "SELECT State FROM representative GROUP BY State HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: What states have at least two representatives?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1191, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of representatives that have not participated in elections listed here.", "output": "SELECT Name FROM representative WHERE Representative_ID NOT IN (SELECT Representative_ID FROM election)", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: List the names of representatives that have not participated in elections listed here.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1192, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the parties that have both representatives in New York state and representatives in Pennsylvania state.", "output": "SELECT Party FROM representative WHERE State = \"New York\" INTERSECT SELECT Party FROM representative WHERE State = \"Pennsylvania\"", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: Show the parties that have both representatives in New York state and representatives in Pennsylvania state.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election_representative", "id": 1193, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct parties are there for representatives?", "output": "SELECT count(DISTINCT Party) FROM representative", "input": "Based on \n# the table&column(database schema) information {'election': ['Election_ID', 'Representative_ID', 'Date', 'Votes', 'Vote_Percent', 'Seats', 'Place'], 'representative': ['Representative_ID', 'Name', 'State', 'Party', 'Lifespan']} and \n# the user question: How many distinct parties are there for representatives?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1194, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many apartment bookings are there in total?", "output": "SELECT count(*) FROM Apartment_Bookings", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many apartment bookings are there in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1195, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the total number of apartment bookings.", "output": "SELECT count(*) FROM Apartment_Bookings", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the total number of apartment bookings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1196, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the start dates and end dates of all the apartment bookings.", "output": "SELECT booking_start_date , booking_end_date FROM Apartment_Bookings", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the start dates and end dates of all the apartment bookings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1197, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the start date and end date of each apartment booking?", "output": "SELECT booking_start_date , booking_end_date FROM Apartment_Bookings", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the start date and end date of each apartment booking?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1198, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all distinct building descriptions.", "output": "SELECT DISTINCT building_description FROM Apartment_Buildings", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all distinct building descriptions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1199, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me a list of all the distinct building descriptions.", "output": "SELECT DISTINCT building_description FROM Apartment_Buildings", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me a list of all the distinct building descriptions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1200, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the short names of the buildings managed by \"Emma\".", "output": "SELECT building_short_name FROM Apartment_Buildings WHERE building_manager\t = \"Emma\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the short names of the buildings managed by \"Emma\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1201, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which buildings does \"Emma\" manage? Give me the short names of the buildings.", "output": "SELECT building_short_name FROM Apartment_Buildings WHERE building_manager\t = \"Emma\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which buildings does \"Emma\" manage? Give me the short names of the buildings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1202, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the addresses and phones of all the buildings managed by \"Brenden\".", "output": "SELECT building_address , building_phone FROM Apartment_Buildings WHERE building_manager\t = \"Brenden\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the addresses and phones of all the buildings managed by \"Brenden\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1203, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the address and phone number of the buildings managed by \"Brenden\"?", "output": "SELECT building_address , building_phone FROM Apartment_Buildings WHERE building_manager\t = \"Brenden\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the address and phone number of the buildings managed by \"Brenden\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1204, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the building full names that contain the word \"court\"?", "output": "SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE \"%court%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the building full names that contain the word \"court\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1205, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the building full names containing the word \"court\".", "output": "SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE \"%court%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the building full names containing the word \"court\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1206, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the minimum and maximum number of bathrooms of all the apartments?", "output": "SELECT min(bathroom_count) , max(bathroom_count) FROM Apartments", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the minimum and maximum number of bathrooms of all the apartments?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1207, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the minimum and maximum bathroom count among all the apartments.", "output": "SELECT min(bathroom_count) , max(bathroom_count) FROM Apartments", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the minimum and maximum bathroom count among all the apartments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1208, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of bedrooms of all apartments?", "output": "SELECT avg(bedroom_count) FROM Apartments", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average number of bedrooms of all apartments?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1209, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average number of bedrooms of all the apartments.", "output": "SELECT avg(bedroom_count) FROM Apartments", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average number of bedrooms of all the apartments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1210, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the apartment number and the number of rooms for each apartment.", "output": "SELECT apt_number , room_count FROM Apartments", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the apartment number and the number of rooms for each apartment.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1211, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the apartment number and the room count of each apartment?", "output": "SELECT apt_number , room_count FROM Apartments", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the apartment number and the room count of each apartment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1212, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of rooms of apartments with type code \"Studio\"?", "output": "SELECT avg(room_count) FROM Apartments WHERE apt_type_code = \"Studio\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average number of rooms of apartments with type code \"Studio\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1213, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average room count of the apartments that have the \"Studio\" type code.", "output": "SELECT avg(room_count) FROM Apartments WHERE apt_type_code = \"Studio\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average room count of the apartments that have the \"Studio\" type code.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1214, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the apartment numbers of the apartments with type code \"Flat\".", "output": "SELECT apt_number FROM Apartments WHERE apt_type_code = \"Flat\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the apartment numbers of the apartments with type code \"Flat\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1215, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which apartments have type code \"Flat\"? Give me their apartment numbers.", "output": "SELECT apt_number FROM Apartments WHERE apt_type_code = \"Flat\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which apartments have type code \"Flat\"? Give me their apartment numbers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1216, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the first names and last names of all guests", "output": "SELECT guest_first_name , guest_last_name FROM Guests", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the first names and last names of all guests,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1217, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names and last names of all the guests?", "output": "SELECT guest_first_name , guest_last_name FROM Guests", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names and last names of all the guests?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1218, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the date of birth for all the guests with gender code \"Male\".", "output": "SELECT date_of_birth FROM Guests WHERE gender_code = \"Male\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the date of birth for all the guests with gender code \"Male\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1219, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are dates of birth of all the guests whose gender is \"Male\"?", "output": "SELECT date_of_birth FROM Guests WHERE gender_code = \"Male\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are dates of birth of all the guests whose gender is \"Male\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1220, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the apartment numbers, start dates, and end dates of all the apartment bookings.", "output": "SELECT T2.apt_number , T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the apartment numbers, start dates, and end dates of all the apartment bookings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1221, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the apartment number, start date, and end date of each apartment booking?", "output": "SELECT T2.apt_number , T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the apartment number, start date, and end date of each apartment booking?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1222, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the booking start and end dates of the apartments with type code \"Duplex\"?", "output": "SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = \"Duplex\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the booking start and end dates of the apartments with type code \"Duplex\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1223, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the booking start date and end date for the apartments that have type code \"Duplex\".", "output": "SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = \"Duplex\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the booking start date and end date for the apartments that have type code \"Duplex\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1224, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the booking start and end dates of the apartments with more than 2 bedrooms?", "output": "SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the booking start and end dates of the apartments with more than 2 bedrooms?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1225, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the booking start date and end date for the apartments that have more than two bedrooms.", "output": "SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the booking start date and end date for the apartments that have more than two bedrooms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1226, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the booking status code of the apartment with apartment number \"Suite 634\"?", "output": "SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = \"Suite 634\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the booking status code of the apartment with apartment number \"Suite 634\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1227, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Tell me the booking status code for the apartment with number \"Suite 634\".", "output": "SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = \"Suite 634\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Tell me the booking status code for the apartment with number \"Suite 634\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1228, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the distinct apartment numbers of the apartments that have bookings with status code \"Confirmed\".", "output": "SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Confirmed\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the distinct apartment numbers of the apartments that have bookings with status code \"Confirmed\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1229, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which apartments have bookings with status code \"Confirmed\"? Return their apartment numbers.", "output": "SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Confirmed\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which apartments have bookings with status code \"Confirmed\"? Return their apartment numbers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1230, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average room count of the apartments that have booking status code \"Provisional\".", "output": "SELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Provisional\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the average room count of the apartments that have booking status code \"Provisional\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1231, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average room count of the apartments whose booking status code is \"Provisional\"?", "output": "SELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Provisional\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average room count of the apartments whose booking status code is \"Provisional\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1232, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the guest first names, start dates, and end dates of all the apartment bookings.", "output": "SELECT T2.guest_first_name , T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the guest first names, start dates, and end dates of all the apartment bookings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1233, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the guest first name, start date, and end date of each apartment booking?", "output": "SELECT T2.guest_first_name , T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the guest first name, start date, and end date of each apartment booking?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1234, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the start dates and end dates of all the apartment bookings made by guests with gender code \"Female\".", "output": "SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = \"Female\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the start dates and end dates of all the apartment bookings made by guests with gender code \"Female\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1235, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the start date and end date of the apartment bookings made by female guests (gender code \"Female\")?", "output": "SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = \"Female\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the start date and end date of the apartment bookings made by female guests (gender code \"Female\")?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1236, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the first names and last names of all the guests that have apartment bookings with status code \"Confirmed\".", "output": "SELECT T2.guest_first_name , T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = \"Confirmed\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the first names and last names of all the guests that have apartment bookings with status code \"Confirmed\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1237, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which guests have apartment bookings with status code \"Confirmed\"? Return their first names and last names.", "output": "SELECT T2.guest_first_name , T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = \"Confirmed\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which guests have apartment bookings with status code \"Confirmed\"? Return their first names and last names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1238, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the facility codes of apartments with more than 4 bedrooms.", "output": "SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the facility codes of apartments with more than 4 bedrooms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1239, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the facility codes of the apartments with more than four bedrooms?", "output": "SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the facility codes of the apartments with more than four bedrooms?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1240, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the total number of rooms of all apartments with facility code \"Gym\".", "output": "SELECT sum(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = \"Gym\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the total number of rooms of all apartments with facility code \"Gym\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1241, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total number of rooms in the apartments that have facility code \"Gym\".", "output": "SELECT sum(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = \"Gym\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total number of rooms in the apartments that have facility code \"Gym\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1242, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the total number of rooms of the apartments in the building with short name \"Columbus Square\".", "output": "SELECT sum(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_short_name = \"Columbus Square\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the total number of rooms of the apartments in the building with short name \"Columbus Square\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1243, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many rooms in total are there in the apartments in the building with short name \"Columbus Square\"?", "output": "SELECT sum(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_short_name = \"Columbus Square\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many rooms in total are there in the apartments in the building with short name \"Columbus Square\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1244, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the addresses of the buildings that have apartments with more than 2 bathrooms.", "output": "SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the addresses of the buildings that have apartments with more than 2 bathrooms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1245, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which buildings have apartments that have more than two bathrooms? Give me the addresses of the buildings.", "output": "SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which buildings have apartments that have more than two bathrooms? Give me the addresses of the buildings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1246, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the apartment type codes and apartment numbers in the buildings managed by \"Kyle\".", "output": "SELECT T2.apt_type_code , T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = \"Kyle\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the apartment type codes and apartment numbers in the buildings managed by \"Kyle\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1247, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What apartment type codes and apartment numbers do the buildings managed by \"Kyle\" have?", "output": "SELECT T2.apt_type_code , T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = \"Kyle\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What apartment type codes and apartment numbers do the buildings managed by \"Kyle\" have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1248, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the booking status code and the corresponding number of bookings.", "output": "SELECT \tbooking_status_code , COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the booking status code and the corresponding number of bookings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1249, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many bookings does each booking status have? List the booking status code and the number of corresponding bookings.", "output": "SELECT \tbooking_status_code , COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many bookings does each booking status have? List the booking status code and the number of corresponding bookings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1250, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return all the apartment numbers sorted by the room count in ascending order.", "output": "SELECT apt_number FROM Apartments ORDER BY room_count ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return all the apartment numbers sorted by the room count in ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1251, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Sort the apartment numbers in ascending order of room count.", "output": "SELECT apt_number FROM Apartments ORDER BY room_count ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Sort the apartment numbers in ascending order of room count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1252, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the apartment number with the largest number of bedrooms.", "output": "SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the apartment number with the largest number of bedrooms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1253, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the apartment number of the apartment with the most beds?", "output": "SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the apartment number of the apartment with the most beds?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1254, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the apartment type codes and the corresponding number of apartments sorted by the number of apartments in ascending order.", "output": "SELECT apt_type_code , COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the apartment type codes and the corresponding number of apartments sorted by the number of apartments in ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1255, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return each apartment type code with the number of apartments having that apartment type, in ascending order of the number of apartments.", "output": "SELECT apt_type_code , COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return each apartment type code with the number of apartments having that apartment type, in ascending order of the number of apartments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1256, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the top 3 apartment type codes sorted by the average number of rooms in descending order.", "output": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the top 3 apartment type codes sorted by the average number of rooms in descending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1257, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the top three apartment types in terms of the average room count? Give me the", "output": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the top three apartment types in terms of the average room count? Give me the,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1258, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the apartment type code that has the largest number of total rooms, together with the number of bathrooms and number of bedrooms.", "output": "SELECT apt_type_code , bathroom_count , bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the apartment type code that has the largest number of total rooms, together with the number of bathrooms and number of bedrooms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1259, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which apartment type has the largest number of total rooms? Return the apartment type code, its number of bathrooms and number of bedrooms.", "output": "SELECT apt_type_code , bathroom_count , bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which apartment type has the largest number of total rooms? Return the apartment type code, its number of bathrooms and number of bedrooms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1260, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the most common apartment type code.", "output": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the most common apartment type code.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1261, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which apartment type code appears the most often?", "output": "SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which apartment type code appears the most often?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1262, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the most common apartment type code among apartments with more than 1 bathroom.", "output": "SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the most common apartment type code among apartments with more than 1 bathroom.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1263, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which apartment type code is the most common among apartments with more than one bathroom?", "output": "SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which apartment type code is the most common among apartments with more than one bathroom?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1264, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show each apartment type code, and the maximum and minimum number of rooms for each type.", "output": "SELECT apt_type_code , max(room_count) , min(room_count) FROM Apartments GROUP BY apt_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show each apartment type code, and the maximum and minimum number of rooms for each type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1265, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return each apartment type code along with the maximum and minimum number of rooms among each type.", "output": "SELECT apt_type_code , max(room_count) , min(room_count) FROM Apartments GROUP BY apt_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return each apartment type code along with the maximum and minimum number of rooms among each type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1266, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show each gender code and the corresponding count of guests sorted by the count in descending order.", "output": "SELECT gender_code , COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show each gender code and the corresponding count of guests sorted by the count in descending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1267, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Sort the gender codes in descending order of their corresponding number of guests. Return both the gender codes and counts.", "output": "SELECT gender_code , COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Sort the gender codes in descending order of their corresponding number of guests. Return both the gender codes and counts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1268, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many apartments do not have any facility?", "output": "SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many apartments do not have any facility?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1269, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of apartments that have no facility.", "output": "SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of apartments that have no facility.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1270, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the apartment numbers of apartments with bookings that have status code both \"Provisional\" and \"Confirmed\"", "output": "SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Confirmed\" INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Provisional\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the apartment numbers of apartments with bookings that have status code both \"Provisional\" and \"Confirmed\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1271, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which apartments have bookings with both status codes \"Provisional\" and \"Confirmed\"? Give me the apartment numbers.", "output": "SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Confirmed\" INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Provisional\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which apartments have bookings with both status codes \"Provisional\" and \"Confirmed\"? Give me the apartment numbers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1272, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the apartment numbers of apartments with unit status availability of both 0 and 1.", "output": "SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the apartment numbers of apartments with unit status availability of both 0 and 1.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "apartment_rentals", "id": 1273, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which apartments have unit status availability of both 0 and 1? Return their apartment numbers.", "output": "SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which apartments have unit status availability of both 0 and 1? Return their apartment numbers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1274, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many games are held after season 2007?", "output": "SELECT count(*) FROM game WHERE season > 2007", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many games are held after season 2007?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1275, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the dates of games by the home team name in descending order.", "output": "SELECT Date FROM game ORDER BY home_team DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the dates of games by the home team name in descending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1276, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the season, home team, away team of all the games.", "output": "SELECT season , home_team , away_team FROM game", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the season, home team, away team of all the games.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1277, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum, minimum and average home games each stadium held?", "output": "SELECT max(home_games) , min(home_games) , avg(home_games) FROM stadium", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum, minimum and average home games each stadium held?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1278, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average attendance of stadiums with capacity percentage higher than 100%?", "output": "SELECT average_attendance FROM stadium WHERE capacity_percentage > 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average attendance of stadiums with capacity percentage higher than 100%?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1279, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the player name, number of matches, and information source for players who do not suffer from injury of 'Knee problem'?", "output": "SELECT player , number_of_matches , SOURCE FROM injury_accident WHERE injury != 'Knee problem'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the player name, number of matches, and information source for players who do not suffer from injury of 'Knee problem'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1280, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the season of the game which causes the player 'Walter Samuel' to get injured?", "output": "SELECT T1.season FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id WHERE T2.player = 'Walter Samuel'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the season of the game which causes the player 'Walter Samuel' to get injured?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1281, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids, scores, and dates of the games which caused at least two injury accidents?", "output": "SELECT T1.id , T1.score , T1.date FROM game AS T1 JOIN injury_accident AS T2 ON T2.game_id = T1.id GROUP BY T1.id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids, scores, and dates of the games which caused at least two injury accidents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1282, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the id and name of the stadium where the most injury accidents happened?", "output": "SELECT T1.id , T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id JOIN injury_accident AS T3 ON T2.id = T3.game_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the id and name of the stadium where the most injury accidents happened?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1283, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id and name of the stadium where the largest number of injury accidents occurred.", "output": "SELECT T1.id , T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id JOIN injury_accident AS T3 ON T2.id = T3.game_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id and name of the stadium where the largest number of injury accidents occurred.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1284, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'?", "output": "SELECT T1.season , T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.injury = 'Foot injury' OR T3.injury = 'Knee problem'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1285, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different kinds of information sources are there for injury accidents?", "output": "SELECT count(DISTINCT SOURCE) FROM injury_accident", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different kinds of information sources are there for injury accidents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1286, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many games are free of injury accidents?", "output": "SELECT count(*) FROM game WHERE id NOT IN ( SELECT game_id FROM injury_accident )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many games are free of injury accidents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1287, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct kinds of injuries happened after season 2010?", "output": "SELECT count(DISTINCT T1.injury) FROM injury_accident AS T1 JOIN game AS T2 ON T1.game_id = T2.id WHERE T2.season > 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct kinds of injuries happened after season 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1288, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of the stadium where both the player 'Walter Samuel' and the player 'Thiago Motta' got injured.", "output": "SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.player = 'Walter Samuel' INTERSECT SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.player = 'Thiago Motta'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of the stadium where both the player 'Walter Samuel' and the player 'Thiago Motta' got injured.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1289, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name, average attendance, total attendance for stadiums where no accidents happened.", "output": "SELECT name , average_attendance , total_attendance FROM stadium EXCEPT SELECT T2.name , T2.average_attendance , T2.total_attendance FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name, average attendance, total attendance for stadiums where no accidents happened.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1290, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which stadium name contains the substring \"Bank\"?", "output": "SELECT name FROM stadium WHERE name LIKE \"%Bank%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which stadium name contains the substring \"Bank\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1291, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many games has each stadium held?", "output": "SELECT T1.id , count(*) FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id GROUP BY T1.id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many games has each stadium held?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_injury", "id": 1292, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T1.date , T2.player FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id ORDER BY T1.season DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_1", "id": 1293, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all country and league names.", "output": "SELECT T1.name , T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all country and league names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_1", "id": 1294, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many leagues are there in England?", "output": "SELECT count(*) FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id WHERE T1.name = \"England\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many leagues are there in England?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_1", "id": 1295, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average weight of all players?", "output": "SELECT avg(weight) FROM Player", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average weight of all players?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_1", "id": 1296, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum and minimum height of all players?", "output": "SELECT max(weight) , min(weight) FROM Player", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the maximum and minimum height of all players?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_1", "id": 1297, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all player names who have an overall rating higher than the average.", "output": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.overall_rating > ( SELECT avg(overall_rating) FROM Player_Attributes )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all player names who have an overall rating higher than the average.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_1", "id": 1298, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of players who have the best dribbling?", "output": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.dribbling = ( SELECT max(overall_rating) FROM Player_Attributes)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of players who have the best dribbling?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_1", "id": 1299, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all players who have a crossing score higher than 90 and prefer their right foot.", "output": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.crossing > 90 AND T2.preferred_foot = \"right\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of all players who have a crossing score higher than 90 and prefer their right foot.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_1", "id": 1300, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all left-footed players who have overall rating between 85 and 90.", "output": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.preferred_foot = \"left\" AND T2.overall_rating >= 85 AND T2.overall_rating <= 90", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of all left-footed players who have overall rating between 85 and 90.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_1", "id": 1301, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average rating for right-footed players and left-footed players?", "output": "SELECT preferred_foot , avg(overall_rating) FROM Player_Attributes GROUP BY preferred_foot", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average rating for right-footed players and left-footed players?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_1", "id": 1302, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Of all players with an overall rating greater than 80, how many are right-footed and left-footed?", "output": "SELECT preferred_foot , count(*) FROM Player_Attributes WHERE overall_rating > 80 GROUP BY preferred_foot", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Of all players with an overall rating greater than 80, how many are right-footed and left-footed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_1", "id": 1303, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all of the player ids with a height of at least 180cm and an overall rating higher than 85.", "output": "SELECT player_api_id FROM Player WHERE height >= 180 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE overall_rating > 85", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all of the player ids with a height of at least 180cm and an overall rating higher than 85.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_1", "id": 1304, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all of the ids for left-footed players with a height between 180cm and 190cm.", "output": "SELECT player_api_id FROM Player WHERE height >= 180 AND height <= 190 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE preferred_foot = \"left\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all of the ids for left-footed players with a height between 180cm and 190cm.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_1", "id": 1305, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the top 3 players in terms of overall rating?", "output": "SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY overall_rating DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who are the top 3 players in terms of overall rating?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_1", "id": 1306, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names and birthdays of the top five players in terms of potential.", "output": "SELECT DISTINCT T1.player_name , T1.birthday FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY potential DESC LIMIT 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names and birthdays of the top five players in terms of potential.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "performance_attendance", "id": 1307, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many performances are there?", "output": "SELECT count(*) FROM performance", "input": "Based on \n# the table&column(database schema) information {'member': ['Member_ID', 'Name', 'Nationality', 'Role'], 'performance': ['Performance_ID', 'Date', 'Host', 'Location', 'Attendance'], 'member_attendance': ['Member_ID', 'Performance_ID', 'Num_of_Pieces']} and \n# the user question: How many performances are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "performance_attendance", "id": 1308, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the hosts of performances in ascending order of attendance.", "output": "SELECT HOST FROM performance ORDER BY Attendance ASC", "input": "Based on \n# the table&column(database schema) information {'member': ['Member_ID', 'Name', 'Nationality', 'Role'], 'performance': ['Performance_ID', 'Date', 'Host', 'Location', 'Attendance'], 'member_attendance': ['Member_ID', 'Performance_ID', 'Num_of_Pieces']} and \n# the user question: List the hosts of performances in ascending order of attendance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "performance_attendance", "id": 1309, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the dates and locations of performances?", "output": "SELECT Date , LOCATION FROM performance", "input": "Based on \n# the table&column(database schema) information {'member': ['Member_ID', 'Name', 'Nationality', 'Role'], 'performance': ['Performance_ID', 'Date', 'Host', 'Location', 'Attendance'], 'member_attendance': ['Member_ID', 'Performance_ID', 'Num_of_Pieces']} and \n# the user question: What are the dates and locations of performances?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "performance_attendance", "id": 1310, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the attendances of the performances at location \"TD Garden\" or \"Bell Centre\"", "output": "SELECT Attendance FROM performance WHERE LOCATION = \"TD Garden\" OR LOCATION = \"Bell Centre\"", "input": "Based on \n# the table&column(database schema) information {'member': ['Member_ID', 'Name', 'Nationality', 'Role'], 'performance': ['Performance_ID', 'Date', 'Host', 'Location', 'Attendance'], 'member_attendance': ['Member_ID', 'Performance_ID', 'Num_of_Pieces']} and \n# the user question: Show the attendances of the performances at location \"TD Garden\" or \"Bell Centre\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "performance_attendance", "id": 1311, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of attendees for performances?", "output": "SELECT avg(Attendance) FROM performance", "input": "Based on \n# the table&column(database schema) information {'member': ['Member_ID', 'Name', 'Nationality', 'Role'], 'performance': ['Performance_ID', 'Date', 'Host', 'Location', 'Attendance'], 'member_attendance': ['Member_ID', 'Performance_ID', 'Num_of_Pieces']} and \n# the user question: What is the average number of attendees for performances?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "performance_attendance", "id": 1312, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the date of the performance with the highest number of attendees?", "output": "SELECT Date FROM performance ORDER BY Attendance DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'member': ['Member_ID', 'Name', 'Nationality', 'Role'], 'performance': ['Performance_ID', 'Date', 'Host', 'Location', 'Attendance'], 'member_attendance': ['Member_ID', 'Performance_ID', 'Num_of_Pieces']} and \n# the user question: What is the date of the performance with the highest number of attendees?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "performance_attendance", "id": 1313, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show different locations and the number of performances at each location.", "output": "SELECT LOCATION , COUNT(*) FROM performance GROUP BY LOCATION", "input": "Based on \n# the table&column(database schema) information {'member': ['Member_ID', 'Name', 'Nationality', 'Role'], 'performance': ['Performance_ID', 'Date', 'Host', 'Location', 'Attendance'], 'member_attendance': ['Member_ID', 'Performance_ID', 'Num_of_Pieces']} and \n# the user question: Show different locations and the number of performances at each location.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "performance_attendance", "id": 1314, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the most common location of performances.", "output": "SELECT LOCATION FROM performance GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'member': ['Member_ID', 'Name', 'Nationality', 'Role'], 'performance': ['Performance_ID', 'Date', 'Host', 'Location', 'Attendance'], 'member_attendance': ['Member_ID', 'Performance_ID', 'Num_of_Pieces']} and \n# the user question: Show the most common location of performances.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "performance_attendance", "id": 1315, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the locations that have at least two performances.", "output": "SELECT LOCATION FROM performance GROUP BY LOCATION HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'member': ['Member_ID', 'Name', 'Nationality', 'Role'], 'performance': ['Performance_ID', 'Date', 'Host', 'Location', 'Attendance'], 'member_attendance': ['Member_ID', 'Performance_ID', 'Num_of_Pieces']} and \n# the user question: Show the locations that have at least two performances.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "performance_attendance", "id": 1316, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees.", "output": "SELECT LOCATION FROM performance WHERE Attendance > 2000 INTERSECT SELECT LOCATION FROM performance WHERE Attendance < 1000", "input": "Based on \n# the table&column(database schema) information {'member': ['Member_ID', 'Name', 'Nationality', 'Role'], 'performance': ['Performance_ID', 'Date', 'Host', 'Location', 'Attendance'], 'member_attendance': ['Member_ID', 'Performance_ID', 'Num_of_Pieces']} and \n# the user question: Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "performance_attendance", "id": 1317, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of members and the location of the performances they attended.", "output": "SELECT T2.Name , T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID", "input": "Based on \n# the table&column(database schema) information {'member': ['Member_ID', 'Name', 'Nationality', 'Role'], 'performance': ['Performance_ID', 'Date', 'Host', 'Location', 'Attendance'], 'member_attendance': ['Member_ID', 'Performance_ID', 'Num_of_Pieces']} and \n# the user question: Show the names of members and the location of the performances they attended.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "performance_attendance", "id": 1318, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of members and the location of performances they attended in ascending alphabetical order of their names.", "output": "SELECT T2.Name , T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID ORDER BY T2.Name ASC", "input": "Based on \n# the table&column(database schema) information {'member': ['Member_ID', 'Name', 'Nationality', 'Role'], 'performance': ['Performance_ID', 'Date', 'Host', 'Location', 'Attendance'], 'member_attendance': ['Member_ID', 'Performance_ID', 'Num_of_Pieces']} and \n# the user question: Show the names of members and the location of performances they attended in ascending alphabetical order of their names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "performance_attendance", "id": 1319, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the dates of performances with attending members whose roles are \"Violin\".", "output": "SELECT T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID WHERE T2.Role = \"Violin\"", "input": "Based on \n# the table&column(database schema) information {'member': ['Member_ID', 'Name', 'Nationality', 'Role'], 'performance': ['Performance_ID', 'Date', 'Host', 'Location', 'Attendance'], 'member_attendance': ['Member_ID', 'Performance_ID', 'Num_of_Pieces']} and \n# the user question: Show the dates of performances with attending members whose roles are \"Violin\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "performance_attendance", "id": 1320, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of members and the dates of performances they attended in descending order of attendance of the performances.", "output": "SELECT T2.Name , T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID ORDER BY T3.Attendance DESC", "input": "Based on \n# the table&column(database schema) information {'member': ['Member_ID', 'Name', 'Nationality', 'Role'], 'performance': ['Performance_ID', 'Date', 'Host', 'Location', 'Attendance'], 'member_attendance': ['Member_ID', 'Performance_ID', 'Num_of_Pieces']} and \n# the user question: Show the names of members and the dates of performances they attended in descending order of attendance of the performances.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "performance_attendance", "id": 1321, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of members who did not attend any performance.", "output": "SELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM member_attendance)", "input": "Based on \n# the table&column(database schema) information {'member': ['Member_ID', 'Name', 'Nationality', 'Role'], 'performance': ['Performance_ID', 'Date', 'Host', 'Location', 'Attendance'], 'member_attendance': ['Member_ID', 'Performance_ID', 'Num_of_Pieces']} and \n# the user question: List the names of members who did not attend any performance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1322, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the buildings which have rooms with capacity more than 50.", "output": "SELECT DISTINCT building FROM classroom WHERE capacity > 50", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the buildings which have rooms with capacity more than 50.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1323, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct buildings with capacities of greater than 50?", "output": "SELECT DISTINCT building FROM classroom WHERE capacity > 50", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct buildings with capacities of greater than 50?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1324, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of rooms that are not in the Lamberton building.", "output": "SELECT count(*) FROM classroom WHERE building != 'Lamberton'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of rooms that are not in the Lamberton building.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1325, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many classrooms are not in Lamberton?", "output": "SELECT count(*) FROM classroom WHERE building != 'Lamberton'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many classrooms are not in Lamberton?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1326, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and building of the departments whose budget is more than the average budget?", "output": "SELECT dept_name , building FROM department WHERE budget > (SELECT avg(budget) FROM department)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and building of the departments whose budget is more than the average budget?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1327, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the name and building of the departments with greater than average budget.", "output": "SELECT dept_name , building FROM department WHERE budget > (SELECT avg(budget) FROM department)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the name and building of the departments with greater than average budget.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1328, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the room number of the rooms which can sit 50 to 100 students and their buildings.", "output": "SELECT building , room_number FROM classroom WHERE capacity BETWEEN 50 AND 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the room number of the rooms which can sit 50 to 100 students and their buildings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1329, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students?", "output": "SELECT building , room_number FROM classroom WHERE capacity BETWEEN 50 AND 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1330, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and building of the department with the highest budget.", "output": "SELECT dept_name , building FROM department ORDER BY budget DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and building of the department with the highest budget.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1331, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the department name and corresponding building for the department with the greatest budget?", "output": "SELECT dept_name , building FROM department ORDER BY budget DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the department name and corresponding building for the department with the greatest budget?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1332, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the student who has the highest total credits in the History department.", "output": "SELECT name FROM student WHERE dept_name = 'History' ORDER BY tot_cred DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the student who has the highest total credits in the History department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1333, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the name of the student in the History department with the most credits.", "output": "SELECT name FROM student WHERE dept_name = 'History' ORDER BY tot_cred DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the name of the student in the History department with the most credits.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1334, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many rooms does the Lamberton building have?", "output": "SELECT count(*) FROM classroom WHERE building = 'Lamberton'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many rooms does the Lamberton building have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1335, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of classrooms in Lamberton.", "output": "SELECT count(*) FROM classroom WHERE building = 'Lamberton'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of classrooms in Lamberton.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1336, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students have advisors?", "output": "SELECT count(DISTINCT s_id) FROM advisor", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students have advisors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1337, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of students who have advisors.", "output": "SELECT count(DISTINCT s_id) FROM advisor", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of students who have advisors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1338, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many departments offer courses?", "output": "SELECT count(DISTINCT dept_name) FROM course", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many departments offer courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1339, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of departments which offer courses.", "output": "SELECT count(DISTINCT dept_name) FROM course", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of departments which offer courses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1340, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different courses offered by Physics department?", "output": "SELECT count(DISTINCT course_id) FROM course WHERE dept_name = 'Physics'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different courses offered by Physics department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1341, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of courses in the Physics department.", "output": "SELECT count(DISTINCT course_id) FROM course WHERE dept_name = 'Physics'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of courses in the Physics department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1342, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the title of courses that have two prerequisites?", "output": "SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING count(*) = 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the title of courses that have two prerequisites?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1343, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles for courses with two prerequisites?", "output": "SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING count(*) = 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the titles for courses with two prerequisites?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1344, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the title, credit, and department name of courses that have more than one prerequisites?", "output": "SELECT T1.title , T1.credits , T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the title, credit, and department name of courses that have more than one prerequisites?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1345, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the title, credit value, and department name for courses with more than one prerequisite?", "output": "SELECT T1.title , T1.credits , T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the title, credit value, and department name for courses with more than one prerequisite?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1346, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many courses that do not have prerequisite?", "output": "SELECT count(*) FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many courses that do not have prerequisite?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1347, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of courses without prerequisites.", "output": "SELECT count(*) FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of courses without prerequisites.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1348, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the courses that do not have any prerequisite?", "output": "SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the courses that do not have any prerequisite?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1349, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of courses without prerequisites?", "output": "SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the titles of courses without prerequisites?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1350, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different instructors have taught some course?", "output": "SELECT COUNT (DISTINCT id) FROM teaches", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different instructors have taught some course?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1351, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of distinct instructors who have taught a course.", "output": "SELECT COUNT (DISTINCT id) FROM teaches", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of distinct instructors who have taught a course.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1352, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total budgets of the Marketing or Finance department.", "output": "SELECT sum(budget) FROM department WHERE dept_name = 'Marketing' OR dept_name = 'Finance'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total budgets of the Marketing or Finance department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1353, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the sum of budgets of the Marketing and Finance departments?", "output": "SELECT sum(budget) FROM department WHERE dept_name = 'Marketing' OR dept_name = 'Finance'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the sum of budgets of the Marketing and Finance departments?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1354, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the department name of the instructor whose name contains 'Soisalon'.", "output": "SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the department name of the instructor whose name contains 'Soisalon'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1355, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the department with an instructure who has a name like 'Soisalon'?", "output": "SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the department with an instructure who has a name like 'Soisalon'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1356, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many rooms whose capacity is less than 50 does the Lamberton building have?", "output": "SELECT count(*) FROM classroom WHERE building = 'Lamberton' AND capacity < 50", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many rooms whose capacity is less than 50 does the Lamberton building have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1357, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of rooms in Lamberton with capacity lower than 50.", "output": "SELECT count(*) FROM classroom WHERE building = 'Lamberton' AND capacity < 50", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of rooms in Lamberton with capacity lower than 50.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1358, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and budget of departments whose budgets are more than the average budget.", "output": "SELECT dept_name , budget FROM department WHERE budget > (SELECT avg(budget) FROM department)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and budget of departments whose budgets are more than the average budget.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1359, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and budgets of departments with budgets greater than the average?", "output": "SELECT dept_name , budget FROM department WHERE budget > (SELECT avg(budget) FROM department)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and budgets of departments with budgets greater than the average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1360, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what is the name of the instructor who is in Statistics department and earns the lowest salary?", "output": "SELECT name FROM instructor WHERE dept_name = 'Statistics' ORDER BY salary LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what is the name of the instructor who is in Statistics department and earns the lowest salary?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1361, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the name of the lowest earning instructor in the Statistics department.", "output": "SELECT name FROM instructor WHERE dept_name = 'Statistics' ORDER BY salary LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the name of the lowest earning instructor in the Statistics department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1362, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the title of course that is provided by both Statistics and Psychology departments.", "output": "SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the title of course that is provided by both Statistics and Psychology departments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1363, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the title of a course that is listed in both the Statistics and Psychology departments?", "output": "SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the title of a course that is listed in both the Statistics and Psychology departments?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1364, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the title of course that is provided by Statistics but not Psychology departments.", "output": "SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the title of course that is provided by Statistics but not Psychology departments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1365, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of courses that are in the Statistics department but not the Psychology department?", "output": "SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the titles of courses that are in the Statistics department but not the Psychology department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1366, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of instructors who taught a class in Fall 2009 but not in Spring 2010.", "output": "SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id of instructors who taught a class in Fall 2009 but not in Spring 2010.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1367, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of instructors who taught in the Fall of 2009 but not in the Spring of 2010?", "output": "SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of instructors who taught in the Fall of 2009 but not in the Spring of 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1368, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of students who took any class in the years of 2009 and 2010.", "output": "SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of students who took any class in the years of 2009 and 2010.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1369, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the students who took classes in 2009 or 2010?", "output": "SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the students who took classes in 2009 or 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1370, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the top 3 departments that provide the largest amount of courses?", "output": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY count(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the top 3 departments that provide the largest amount of courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1371, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the 3 departments with the most courses?", "output": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY count(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the 3 departments with the most courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1372, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the department that offers the highest total credits?", "output": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY sum(credits) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the department that offers the highest total credits?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1373, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the department with the most credits?", "output": "SELECT dept_name FROM course GROUP BY dept_name ORDER BY sum(credits) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the department with the most credits?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1374, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all courses ordered by their titles and credits.", "output": "SELECT title FROM course ORDER BY title , credits", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of all courses ordered by their titles and credits.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1375, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Given the titles of all courses, in order of titles and credits.", "output": "SELECT title FROM course ORDER BY title , credits", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Given the titles of all courses, in order of titles and credits.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1376, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which department has the lowest budget?", "output": "SELECT dept_name FROM department ORDER BY budget LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which department has the lowest budget?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1377, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the name of the department with the lowest budget.", "output": "SELECT dept_name FROM department ORDER BY budget LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the name of the department with the lowest budget.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1378, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names and buildings of all departments sorted by the budget from large to small.", "output": "SELECT dept_name , building FROM department ORDER BY budget DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names and buildings of all departments sorted by the budget from large to small.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1379, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and buildings of the deparments, sorted by budget descending?", "output": "SELECT dept_name , building FROM department ORDER BY budget DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and buildings of the deparments, sorted by budget descending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1380, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the instructor with the highest salary?", "output": "SELECT name FROM instructor ORDER BY salary DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who is the instructor with the highest salary?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1381, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the name of the highest paid instructor.", "output": "SELECT name FROM instructor ORDER BY salary DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the name of the highest paid instructor.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1382, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the information of all instructors ordered by their salary in ascending order.", "output": "SELECT * FROM instructor ORDER BY salary", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the information of all instructors ordered by their salary in ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1383, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give all information regarding instructors, in order of salary from least to greatest.", "output": "SELECT * FROM instructor ORDER BY salary", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give all information regarding instructors, in order of salary from least to greatest.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1384, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the students and their department names sorted by their total credits in ascending order.", "output": "SELECT name , dept_name FROM student ORDER BY tot_cred", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the students and their department names sorted by their total credits in ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1385, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of students and their respective departments, ordered by number of credits from least to greatest?", "output": "SELECT name , dept_name FROM student ORDER BY tot_cred", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of students and their respective departments, ordered by number of credits from least to greatest?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1386, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "list in alphabetic order all course names and their instructors' names in year 2008.", "output": "SELECT T1.title , T3.name FROM course AS T1 JOIN teaches AS T2 ON T1.course_id = T2.course_id JOIN instructor AS T3 ON T2.id = T3.id WHERE YEAR = 2008 ORDER BY T1.title", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: list in alphabetic order all course names and their instructors' names in year 2008.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1387, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all titles and their instructors' names for courses in 2008, in alphabetical order by title.", "output": "SELECT T1.title , T3.name FROM course AS T1 JOIN teaches AS T2 ON T1.course_id = T2.course_id JOIN instructor AS T3 ON T2.id = T3.id WHERE YEAR = 2008 ORDER BY T1.title", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all titles and their instructors' names for courses in 2008, in alphabetical order by title.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1388, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of instructors who are advising more than one student.", "output": "SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id = T2.i_id GROUP BY T2.i_id HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of instructors who are advising more than one student.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1389, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of instructors who advise more than one student?", "output": "SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id = T2.i_id GROUP BY T2.i_id HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of instructors who advise more than one student?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1390, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the students who have more than one advisor?", "output": "SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id = T2.s_id GROUP BY T2.s_id HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the students who have more than one advisor?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1391, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of students who have more than one advisor?", "output": "SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id = T2.s_id GROUP BY T2.s_id HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of students who have more than one advisor?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1392, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of rooms with more than 50 capacity for each building.", "output": "SELECT count(*) , building FROM classroom WHERE capacity > 50 GROUP BY building", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of rooms with more than 50 capacity for each building.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1393, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many rooms in each building have a capacity of over 50?", "output": "SELECT count(*) , building FROM classroom WHERE capacity > 50 GROUP BY building", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many rooms in each building have a capacity of over 50?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1394, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the maximum and average capacity among rooms in each building.", "output": "SELECT max(capacity) , avg(capacity) , building FROM classroom GROUP BY building", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the maximum and average capacity among rooms in each building.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1395, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the greatest and average capacity for rooms in each building?", "output": "SELECT max(capacity) , avg(capacity) , building FROM classroom GROUP BY building", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the greatest and average capacity for rooms in each building?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1396, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the title of the course that is offered by more than one department.", "output": "SELECT title FROM course GROUP BY title HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the title of the course that is offered by more than one department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1397, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of courses that are offered in more than one department?", "output": "SELECT title FROM course GROUP BY title HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the titles of courses that are offered in more than one department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1398, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total credits of courses provided by different department.", "output": "SELECT sum(credits) , dept_name FROM course GROUP BY dept_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total credits of courses provided by different department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1399, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many total credits are offered by each department?", "output": "SELECT sum(credits) , dept_name FROM course GROUP BY dept_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many total credits are offered by each department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1400, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the minimum salary for the departments whose average salary is above the average payment of all instructors.", "output": "SELECT min(salary) , dept_name FROM instructor GROUP BY dept_name HAVING avg(salary) > (SELECT avg(salary) FROM instructor)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the minimum salary for the departments whose average salary is above the average payment of all instructors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1401, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the lowest salary in departments with average salary greater than the overall average.", "output": "SELECT min(salary) , dept_name FROM instructor GROUP BY dept_name HAVING avg(salary) > (SELECT avg(salary) FROM instructor)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the lowest salary in departments with average salary greater than the overall average.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1402, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of courses provided in each semester and year.", "output": "SELECT count(*) , semester , YEAR FROM SECTION GROUP BY semester , YEAR", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of courses provided in each semester and year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1403, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many courses are provided in each semester and year?", "output": "SELECT count(*) , semester , YEAR FROM SECTION GROUP BY semester , YEAR", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many courses are provided in each semester and year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1404, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the year which offers the largest number of courses.", "output": "SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the year which offers the largest number of courses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1405, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which year had the greatest number of courses?", "output": "SELECT YEAR FROM SECTION GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which year had the greatest number of courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1406, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the year and semester when offers the largest number of courses.", "output": "SELECT semester , YEAR FROM SECTION GROUP BY semester , YEAR ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the year and semester when offers the largest number of courses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1407, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the year and semester with the most courses?", "output": "SELECT semester , YEAR FROM SECTION GROUP BY semester , YEAR ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the year and semester with the most courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1408, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of department has the highest amount of students?", "output": "SELECT dept_name FROM student GROUP BY dept_name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of department has the highest amount of students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1409, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the deparment with the highest enrollment?", "output": "SELECT dept_name FROM student GROUP BY dept_name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the deparment with the highest enrollment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1410, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total number of students in each department.", "output": "SELECT count(*) , dept_name FROM student GROUP BY dept_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total number of students in each department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1411, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are in each department?", "output": "SELECT count(*) , dept_name FROM student GROUP BY dept_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students are in each department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1412, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the semester and year which has the least number of student taking any class.", "output": "SELECT semester , YEAR FROM takes GROUP BY semester , YEAR ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the semester and year which has the least number of student taking any class.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1413, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which semeseter and year had the fewest students?", "output": "SELECT semester , YEAR FROM takes GROUP BY semester , YEAR ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which semeseter and year had the fewest students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1414, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the instructor who advises of all students from History department?", "output": "SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the instructor who advises of all students from History department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1415, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give id of the instructor who advises students in the History department.", "output": "SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id = T2.id WHERE T2.dept_name = 'History'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give id of the instructor who advises students in the History department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1416, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and salary of the instructors who are advisors of any student from History department?", "output": "SELECT T2.name , T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'History'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and salary of the instructors who are advisors of any student from History department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1417, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and salaries of instructors who advises students in the History department?", "output": "SELECT T2.name , T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'History'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and salaries of instructors who advises students in the History department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1418, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of the courses that do not have any prerequisite?", "output": "SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id of the courses that do not have any prerequisite?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1419, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of courses without prerequisites?", "output": "SELECT course_id FROM course EXCEPT SELECT course_id FROM prereq", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of courses without prerequisites?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1420, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the courses that do not have any prerequisite?", "output": "SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the courses that do not have any prerequisite?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1421, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of courses without prerequisites?", "output": "SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of courses without prerequisites?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1422, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the title of the prerequisite class of International Finance course?", "output": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'International Finance')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the title of the prerequisite class of International Finance course?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1423, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the title of the prerequisite to the course International Finance.", "output": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'International Finance')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the title of the prerequisite to the course International Finance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1424, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the title of course whose prerequisite is course Differential Geometry.", "output": "SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id = T2.course_id WHERE T2.title = 'Differential Geometry')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the title of course whose prerequisite is course Differential Geometry.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1425, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the title of the course with Differential Geometry as a prerequisite?", "output": "SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id = T2.course_id WHERE T2.title = 'Differential Geometry')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the title of the course with Differential Geometry as a prerequisite?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1426, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of students who have taken any course in the fall semester of year 2003.", "output": "SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester = 'Fall' AND YEAR = 2003)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of students who have taken any course in the fall semester of year 2003.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1427, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of students who took a course in the Fall of 2003?", "output": "SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester = 'Fall' AND YEAR = 2003)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of students who took a course in the Fall of 2003?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1428, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the title of the course that was offered at building Chandler during the fall semester in the year of 2010?", "output": "SELECT T1.title FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE building = 'Chandler' AND semester = 'Fall' AND YEAR = 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the title of the course that was offered at building Chandler during the fall semester in the year of 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1429, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the title of the course offered in Chandler during the Fall of 2010.", "output": "SELECT T1.title FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE building = 'Chandler' AND semester = 'Fall' AND YEAR = 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the title of the course offered in Chandler during the Fall of 2010.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1430, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the instructors who taught C Programming course before.", "output": "SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id = T2.id JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.title = 'C Programming'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the instructors who taught C Programming course before.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1431, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of instructors who have taught C Programming courses?", "output": "SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id = T2.id JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.title = 'C Programming'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of instructors who have taught C Programming courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1432, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and salary of instructors who are advisors of the students from the Math department.", "output": "SELECT T2.name , T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and salary of instructors who are advisors of the students from the Math department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1433, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and salaries of instructors who advise students in the Math department?", "output": "SELECT T2.name , T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and salaries of instructors who advise students in the Math department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1434, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of instructors who are advisors of the students from the Math department, and sort the results by students' total credit.", "output": "SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math' ORDER BY T3.tot_cred", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of instructors who are advisors of the students from the Math department, and sort the results by students' total credit.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1435, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all instructors who advise students in the math depart sorted by total credits of the student.", "output": "SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math' ORDER BY T3.tot_cred", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all instructors who advise students in the math depart sorted by total credits of the student.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1436, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the course title of the prerequisite of course Mobile Computing?", "output": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the course title of the prerequisite of course Mobile Computing?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1437, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the title of the course that is a prerequisite for Mobile Computing?", "output": "SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.title = 'Mobile Computing')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the title of the course that is a prerequisite for Mobile Computing?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1438, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of instructor who is the advisor of the student who has the highest number of total credits.", "output": "SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id ORDER BY T3.tot_cred DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of instructor who is the advisor of the student who has the highest number of total credits.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1439, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the instructor who advises the student with the greatest number of total credits?", "output": "SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id ORDER BY T3.tot_cred DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the instructor who advises the student with the greatest number of total credits?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1440, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of instructors who didn't teach any courses?", "output": "SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of instructors who didn't teach any courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1441, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of instructors who didn't teach?", "output": "SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of instructors who didn't teach?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1442, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of instructors who didn't teach any courses?", "output": "SELECT id FROM instructor EXCEPT SELECT id FROM teaches", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id of instructors who didn't teach any courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1443, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of instructors who didnt' teach?", "output": "SELECT id FROM instructor EXCEPT SELECT id FROM teaches", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of instructors who didnt' teach?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1444, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of instructors who didn't each any courses in any Spring semester.", "output": "SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches WHERE semester = 'Spring')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of instructors who didn't each any courses in any Spring semester.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1445, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of instructors who didn't teach courses in the Spring?", "output": "SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches WHERE semester = 'Spring')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of instructors who didn't teach courses in the Spring?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1446, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the department which has the highest average salary of professors.", "output": "SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY avg(salary) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the department which has the highest average salary of professors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1447, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which department has the highest average instructor salary?", "output": "SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY avg(salary) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which department has the highest average instructor salary?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1448, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number and averaged salary of all instructors who are in the department with the highest budget.", "output": "SELECT avg(T1.salary) , count(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name = T2.dept_name ORDER BY T2.budget DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number and averaged salary of all instructors who are in the department with the highest budget.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1449, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many instructors are in the department with the highest budget, and what is their average salary?", "output": "SELECT avg(T1.salary) , count(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name = T2.dept_name ORDER BY T2.budget DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many instructors are in the department with the highest budget, and what is their average salary?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1450, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the title and credits of the course that is taught in the largest classroom (with the highest capacity)?", "output": "SELECT T3.title , T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building = T2.building AND T1.room_number = T2.room_number JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.capacity = (SELECT max(capacity) FROM classroom)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the title and credits of the course that is taught in the largest classroom (with the highest capacity)?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1451, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the title and credits for the course that is taught in the classroom with the greatest capacity.", "output": "SELECT T3.title , T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building = T2.building AND T1.room_number = T2.room_number JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.capacity = (SELECT max(capacity) FROM classroom)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the title and credits for the course that is taught in the classroom with the greatest capacity.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1452, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of students who didn't take any course from Biology department.", "output": "SELECT name FROM student WHERE id NOT IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of students who didn't take any course from Biology department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1453, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of students who haven't taken any Biology courses?", "output": "SELECT name FROM student WHERE id NOT IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of students who haven't taken any Biology courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1454, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total number of students and total number of instructors for each department.", "output": "SELECT count(DISTINCT T2.id) , count(DISTINCT T3.id) , T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name GROUP BY T3.dept_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total number of students and total number of instructors for each department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1455, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students and instructors are in each department?", "output": "SELECT count(DISTINCT T2.id) , count(DISTINCT T3.id) , T3.dept_name FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name GROUP BY T3.dept_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students and instructors are in each department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1456, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of students who have taken the prerequisite course of the course with title International Finance.", "output": "SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id = T4.course_id WHERE T3.title = 'International Finance')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of students who have taken the prerequisite course of the course with title International Finance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1457, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of students who have taken the prerequisite for the course International Finance?", "output": "SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id = T4.course_id WHERE T3.title = 'International Finance')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of students who have taken the prerequisite for the course International Finance?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1458, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and salary of instructors whose salary is below the average salary of the instructors in the Physics department.", "output": "SELECT name , salary FROM instructor WHERE salary < (SELECT avg(salary) FROM instructor WHERE dept_name = 'Physics')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and salary of instructors whose salary is below the average salary of the instructors in the Physics department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1459, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and salaries for instructors who earn less than the average salary of instructors in the Physics department?", "output": "SELECT name , salary FROM instructor WHERE salary < (SELECT avg(salary) FROM instructor WHERE dept_name = 'Physics')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and salaries for instructors who earn less than the average salary of instructors in the Physics department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1460, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of students who took some course offered by Statistics department.", "output": "SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id = T2.course_id JOIN student AS T3 ON T2.id = T3.id WHERE T1.dept_name = 'Statistics'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of students who took some course offered by Statistics department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1461, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of students who have taken Statistics courses?", "output": "SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id = T2.course_id JOIN student AS T3 ON T2.id = T3.id WHERE T1.dept_name = 'Statistics'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of students who have taken Statistics courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1462, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the building, room number, semester and year of all courses offered by Psychology department sorted by course titles.", "output": "SELECT T2.building , T2.room_number , T2.semester , T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' ORDER BY T1.title", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the building, room number, semester and year of all courses offered by Psychology department sorted by course titles.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1463, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the building, room number, semester and year of courses in the Psychology department, sorted using course title?", "output": "SELECT T2.building , T2.room_number , T2.semester , T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' ORDER BY T1.title", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the building, room number, semester and year of courses in the Psychology department, sorted using course title?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1464, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all instructors in computer science department", "output": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all instructors in computer science department,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1465, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all instructors in the Comp. Sci. department?", "output": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all instructors in the Comp. Sci. department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1466, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all instructors in Comp. Sci. department with salary > 80000.", "output": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all instructors in Comp. Sci. department with salary > 80000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1467, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the instructors in the Comp. Sci. department who earn more than 80000?", "output": "SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.' AND salary > 80000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the instructors in the Comp. Sci. department who earn more than 80000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1468, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all instructors who have taught some course and the course_id.", "output": "SELECT name , course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all instructors who have taught some course and the course_id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1469, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all instructors who have taught a course, as well as the corresponding course id?", "output": "SELECT name , course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all instructors who have taught a course, as well as the corresponding course id?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1470, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all instructors in the Art department who have taught some course and the course_id.", "output": "SELECT name , course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all instructors in the Art department who have taught some course and the course_id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1471, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of Art instructors who have taught a course, and the corresponding course id?", "output": "SELECT name , course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of Art instructors who have taught a course, and the corresponding course id?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1472, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all instructors whose name includes the substring \u201cdar\u201d.", "output": "SELECT name FROM instructor WHERE name LIKE '%dar%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all instructors whose name includes the substring \u201cdar\u201d.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1473, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all instructors with names that include \"dar\"?", "output": "SELECT name FROM instructor WHERE name LIKE '%dar%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all instructors with names that include \"dar\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1474, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List in alphabetic order the names of all distinct instructors.", "output": "SELECT DISTINCT name FROM instructor ORDER BY name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List in alphabetic order the names of all distinct instructors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1475, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the distinct names of the instructors, ordered by name.", "output": "SELECT DISTINCT name FROM instructor ORDER BY name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the distinct names of the instructors, ordered by name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1476, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find courses that ran in Fall 2009 or in Spring 2010.", "output": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find courses that ran in Fall 2009 or in Spring 2010.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1477, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids for courses in the Fall of 2009 or the Spring of 2010?", "output": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 UNION SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids for courses in the Fall of 2009 or the Spring of 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1478, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find courses that ran in Fall 2009 and in Spring 2010.", "output": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find courses that ran in Fall 2009 and in Spring 2010.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1479, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids for courses that were offered in both Fall of 2009 and Spring of 2010?", "output": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids for courses that were offered in both Fall of 2009 and Spring of 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1480, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find courses that ran in Fall 2009 but not in Spring 2010.", "output": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find courses that ran in Fall 2009 but not in Spring 2010.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1481, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of courses offered in Fall of 2009 but not in Spring of 2010?", "output": "SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of courses offered in Fall of 2009 but not in Spring of 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1482, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the salaries of all distinct instructors that are less than the largest salary.", "output": "SELECT DISTINCT salary FROM instructor WHERE salary < (SELECT max(salary) FROM instructor)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the salaries of all distinct instructors that are less than the largest salary.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1483, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct salaries of all instructors who earned less than the maximum salary?", "output": "SELECT DISTINCT salary FROM instructor WHERE salary < (SELECT max(salary) FROM instructor)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct salaries of all instructors who earned less than the maximum salary?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1484, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total number of instructors who teach a course in the Spring 2010 semester.", "output": "SELECT COUNT (DISTINCT ID) FROM teaches WHERE semester = 'Spring' AND YEAR = 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total number of instructors who teach a course in the Spring 2010 semester.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1485, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many instructors teach a course in the Spring of 2010?", "output": "SELECT COUNT (DISTINCT ID) FROM teaches WHERE semester = 'Spring' AND YEAR = 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many instructors teach a course in the Spring of 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1486, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names and average salaries of all departments whose average salary is greater than 42000.", "output": "SELECT dept_name , AVG (salary) FROM instructor GROUP BY dept_name HAVING AVG (salary) > 42000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names and average salaries of all departments whose average salary is greater than 42000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1487, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and average salaries for departments with average salary higher than 42000?", "output": "SELECT dept_name , AVG (salary) FROM instructor GROUP BY dept_name HAVING AVG (salary) > 42000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and average salaries for departments with average salary higher than 42000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1488, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find names of instructors with salary greater than that of some (at least one) instructor in the Biology department.", "output": "SELECT name FROM instructor WHERE salary > (SELECT min(salary) FROM instructor WHERE dept_name = 'Biology')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find names of instructors with salary greater than that of some (at least one) instructor in the Biology department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1489, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of instructors who earn more than at least one instructor from the Biology department?", "output": "SELECT name FROM instructor WHERE salary > (SELECT min(salary) FROM instructor WHERE dept_name = 'Biology')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of instructors who earn more than at least one instructor from the Biology department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1490, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all instructors whose salary is greater than the salary of all instructors in the Biology department.", "output": "SELECT name FROM instructor WHERE salary > (SELECT max(salary) FROM instructor WHERE dept_name = 'Biology')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all instructors whose salary is greater than the salary of all instructors in the Biology department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_2", "id": 1491, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all instructors with a higher salary than any of the instructors in the Biology department?", "output": "SELECT name FROM instructor WHERE salary > (SELECT max(salary) FROM instructor WHERE dept_name = 'Biology')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all instructors with a higher salary than any of the instructors in the Biology department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "debate", "id": 1492, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many debates are there?", "output": "SELECT count(*) FROM debate", "input": "Based on \n# the table&column(database schema) information {'people': ['People_ID', 'District', 'Name', 'Party', 'Age'], 'debate': ['Debate_ID', 'Date', 'Venue', 'Num_of_Audience'], 'debate_people': ['Debate_ID', 'Affirmative', 'Negative', 'If_Affirmative_Win']} and \n# the user question: How many debates are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "debate", "id": 1493, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the venues of debates in ascending order of the number of audience.", "output": "SELECT Venue FROM debate ORDER BY Num_of_Audience ASC", "input": "Based on \n# the table&column(database schema) information {'people': ['People_ID', 'District', 'Name', 'Party', 'Age'], 'debate': ['Debate_ID', 'Date', 'Venue', 'Num_of_Audience'], 'debate_people': ['Debate_ID', 'Affirmative', 'Negative', 'If_Affirmative_Win']} and \n# the user question: List the venues of debates in ascending order of the number of audience.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "debate", "id": 1494, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the date and venue of each debate?", "output": "SELECT Date , Venue FROM debate", "input": "Based on \n# the table&column(database schema) information {'people': ['People_ID', 'District', 'Name', 'Party', 'Age'], 'debate': ['Debate_ID', 'Date', 'Venue', 'Num_of_Audience'], 'debate_people': ['Debate_ID', 'Affirmative', 'Negative', 'If_Affirmative_Win']} and \n# the user question: What are the date and venue of each debate?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "debate", "id": 1495, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the dates of debates with number of audience bigger than 150", "output": "SELECT Date FROM debate WHERE Num_of_Audience > 150", "input": "Based on \n# the table&column(database schema) information {'people': ['People_ID', 'District', 'Name', 'Party', 'Age'], 'debate': ['Debate_ID', 'Date', 'Venue', 'Num_of_Audience'], 'debate_people': ['Debate_ID', 'Affirmative', 'Negative', 'If_Affirmative_Win']} and \n# the user question: List the dates of debates with number of audience bigger than 150,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "debate", "id": 1496, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of people aged either 35 or 36.", "output": "SELECT Name FROM people WHERE Age = 35 OR Age = 36", "input": "Based on \n# the table&column(database schema) information {'people': ['People_ID', 'District', 'Name', 'Party', 'Age'], 'debate': ['Debate_ID', 'Date', 'Venue', 'Num_of_Audience'], 'debate_people': ['Debate_ID', 'Affirmative', 'Negative', 'If_Affirmative_Win']} and \n# the user question: Show the names of people aged either 35 or 36.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "debate", "id": 1497, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the party of the youngest people?", "output": "SELECT Party FROM people ORDER BY Age ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'people': ['People_ID', 'District', 'Name', 'Party', 'Age'], 'debate': ['Debate_ID', 'Date', 'Venue', 'Num_of_Audience'], 'debate_people': ['Debate_ID', 'Affirmative', 'Negative', 'If_Affirmative_Win']} and \n# the user question: What is the party of the youngest people?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "debate", "id": 1498, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show different parties of people along with the number of people in each party.", "output": "SELECT Party , COUNT(*) FROM people GROUP BY Party", "input": "Based on \n# the table&column(database schema) information {'people': ['People_ID', 'District', 'Name', 'Party', 'Age'], 'debate': ['Debate_ID', 'Date', 'Venue', 'Num_of_Audience'], 'debate_people': ['Debate_ID', 'Affirmative', 'Negative', 'If_Affirmative_Win']} and \n# the user question: Show different parties of people along with the number of people in each party.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "debate", "id": 1499, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the party that has the most people.", "output": "SELECT Party FROM people GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'people': ['People_ID', 'District', 'Name', 'Party', 'Age'], 'debate': ['Debate_ID', 'Date', 'Venue', 'Num_of_Audience'], 'debate_people': ['Debate_ID', 'Affirmative', 'Negative', 'If_Affirmative_Win']} and \n# the user question: Show the party that has the most people.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "debate", "id": 1500, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the distinct venues of debates", "output": "SELECT DISTINCT Venue FROM debate", "input": "Based on \n# the table&column(database schema) information {'people': ['People_ID', 'District', 'Name', 'Party', 'Age'], 'debate': ['Debate_ID', 'Date', 'Venue', 'Num_of_Audience'], 'debate_people': ['Debate_ID', 'Affirmative', 'Negative', 'If_Affirmative_Win']} and \n# the user question: Show the distinct venues of debates,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "debate", "id": 1501, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of people, and dates and venues of debates they are on the affirmative side.", "output": "SELECT T3.Name , T2.Date , T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID", "input": "Based on \n# the table&column(database schema) information {'people': ['People_ID', 'District', 'Name', 'Party', 'Age'], 'debate': ['Debate_ID', 'Date', 'Venue', 'Num_of_Audience'], 'debate_people': ['Debate_ID', 'Affirmative', 'Negative', 'If_Affirmative_Win']} and \n# the user question: Show the names of people, and dates and venues of debates they are on the affirmative side.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "debate", "id": 1502, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name.", "output": "SELECT T3.Name , T2.Date , T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Negative = T3.People_ID ORDER BY T3.Name ASC", "input": "Based on \n# the table&column(database schema) information {'people': ['People_ID', 'District', 'Name', 'Party', 'Age'], 'debate': ['Debate_ID', 'Date', 'Venue', 'Num_of_Audience'], 'debate_people': ['Debate_ID', 'Affirmative', 'Negative', 'If_Affirmative_Win']} and \n# the user question: Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "debate", "id": 1503, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of people that are on affirmative side of debates with number of audience bigger than 200.", "output": "SELECT T3.Name FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID WHERE T2.Num_of_Audience > 200", "input": "Based on \n# the table&column(database schema) information {'people': ['People_ID', 'District', 'Name', 'Party', 'Age'], 'debate': ['Debate_ID', 'Date', 'Venue', 'Num_of_Audience'], 'debate_people': ['Debate_ID', 'Affirmative', 'Negative', 'If_Affirmative_Win']} and \n# the user question: Show the names of people that are on affirmative side of debates with number of audience bigger than 200.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "debate", "id": 1504, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of people and the number of times they have been on the affirmative side of debates.", "output": "SELECT T2.Name , COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative = T2.People_ID GROUP BY T2.Name", "input": "Based on \n# the table&column(database schema) information {'people': ['People_ID', 'District', 'Name', 'Party', 'Age'], 'debate': ['Debate_ID', 'Date', 'Venue', 'Num_of_Audience'], 'debate_people': ['Debate_ID', 'Affirmative', 'Negative', 'If_Affirmative_Win']} and \n# the user question: Show the names of people and the number of times they have been on the affirmative side of debates.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "debate", "id": 1505, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of people who have been on the negative side of debates at least twice.", "output": "SELECT T2.Name FROM debate_people AS T1 JOIN people AS T2 ON T1.Negative = T2.People_ID GROUP BY T2.Name HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'people': ['People_ID', 'District', 'Name', 'Party', 'Age'], 'debate': ['Debate_ID', 'Date', 'Venue', 'Num_of_Audience'], 'debate_people': ['Debate_ID', 'Affirmative', 'Negative', 'If_Affirmative_Win']} and \n# the user question: Show the names of people who have been on the negative side of debates at least twice.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "debate", "id": 1506, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of people that have not been on the affirmative side of debates.", "output": "SELECT Name FROM people WHERE People_id NOT IN (SELECT Affirmative FROM debate_people)", "input": "Based on \n# the table&column(database schema) information {'people': ['People_ID', 'District', 'Name', 'Party', 'Age'], 'debate': ['Debate_ID', 'Date', 'Venue', 'Num_of_Audience'], 'debate_people': ['Debate_ID', 'Affirmative', 'Negative', 'If_Affirmative_Win']} and \n# the user question: List the names of people that have not been on the affirmative side of debates.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1507, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all the customers in alphabetical order.", "output": "SELECT customer_details FROM customers ORDER BY customer_details", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of all the customers in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1508, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Sort the customer names in alphabetical order.", "output": "SELECT customer_details FROM customers ORDER BY customer_details", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Sort the customer names in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1509, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the policy type codes associated with the customer \"Dayana Robel\"", "output": "SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t2.customer_details = \"Dayana Robel\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the policy type codes associated with the customer \"Dayana Robel\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1510, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the type codes of the policies used by the customer \"Dayana Robel\"?", "output": "SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t2.customer_details = \"Dayana Robel\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the type codes of the policies used by the customer \"Dayana Robel\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1511, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which type of policy is most frequently used? Give me the policy type code.", "output": "SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which type of policy is most frequently used? Give me the policy type code.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1512, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the type code of the most frequently used policy.", "output": "SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the type code of the most frequently used policy.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1513, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the policy types that are used by more than 2 customers.", "output": "SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the policy types that are used by more than 2 customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1514, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which types of policy are chosen by more than 2 customers? Give me the policy type codes.", "output": "SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which types of policy are chosen by more than 2 customers? Give me the policy type codes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1515, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total and average amount paid in claim headers.", "output": "SELECT sum(amount_piad) , avg(amount_piad) FROM claim_headers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total and average amount paid in claim headers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1516, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the total amount and average amount paid in claim headers?", "output": "SELECT sum(amount_piad) , avg(amount_piad) FROM claim_headers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the total amount and average amount paid in claim headers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1517, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total amount claimed in the most recently created document.", "output": "SELECT sum(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id = t2.claim_id WHERE t2.created_date = (SELECT created_date FROM claims_documents ORDER BY created_date LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total amount claimed in the most recently created document.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1518, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How much amount in total were claimed in the most recently created document?", "output": "SELECT sum(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id = t2.claim_id WHERE t2.created_date = (SELECT created_date FROM claims_documents ORDER BY created_date LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How much amount in total were claimed in the most recently created document?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1519, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the customer who has made the largest amount of claim in a single claim?", "output": "SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_claimed = (SELECT max(amount_claimed) FROM claim_headers)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the customer who has made the largest amount of claim in a single claim?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1520, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customer made the largest amount of claim in a single claim? Return the customer details.", "output": "SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_claimed = (SELECT max(amount_claimed) FROM claim_headers)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customer made the largest amount of claim in a single claim? Return the customer details.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1521, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the customer who has made the minimum amount of payment in one claim?", "output": "SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT min(amount_piad) FROM claim_headers)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the customer who has made the minimum amount of payment in one claim?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1522, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customer made the smallest amount of claim in one claim? Return the customer details.", "output": "SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT min(amount_piad) FROM claim_headers)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customer made the smallest amount of claim in one claim? Return the customer details.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1523, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of customers who have no policies associated.", "output": "SELECT customer_details FROM customers EXCEPT SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of customers who have no policies associated.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1524, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of customers who do not have any policies?", "output": "SELECT customer_details FROM customers EXCEPT SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of customers who do not have any policies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1525, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many claim processing stages are there in total?", "output": "SELECT count(*) FROM claims_processing_stages", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many claim processing stages are there in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1526, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of distinct stages in claim processing.", "output": "SELECT count(*) FROM claims_processing_stages", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of distinct stages in claim processing.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1527, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the claim processing stage that most of the claims are on?", "output": "SELECT t2.claim_status_name FROM claims_processing AS t1 JOIN claims_processing_stages AS t2 ON t1.claim_stage_id = t2.claim_stage_id GROUP BY t1.claim_stage_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the claim processing stage that most of the claims are on?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1528, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which claim processing stage has the most claims? Show the claim status name.", "output": "SELECT t2.claim_status_name FROM claims_processing AS t1 JOIN claims_processing_stages AS t2 ON t1.claim_stage_id = t2.claim_stage_id GROUP BY t1.claim_stage_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which claim processing stage has the most claims? Show the claim status name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1529, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of customers whose name contains \"Diana\".", "output": "SELECT customer_details FROM customers WHERE customer_details LIKE \"%Diana%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of customers whose name contains \"Diana\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1530, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customers have the substring \"Diana\" in their names? Return the customer details.", "output": "SELECT customer_details FROM customers WHERE customer_details LIKE \"%Diana%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customers have the substring \"Diana\" in their names? Return the customer details.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1531, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the customers who have an deputy policy.", "output": "SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = \"Deputy\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the customers who have an deputy policy.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1532, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customers have an insurance policy with the type code \"Deputy\"? Give me the customer details.", "output": "SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = \"Deputy\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customers have an insurance policy with the type code \"Deputy\"? Give me the customer details.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1533, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of customers who either have an deputy policy or uniformed policy.", "output": "SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = \"Deputy\" OR t1.policy_type_code = \"Uniform\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of customers who either have an deputy policy or uniformed policy.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1534, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customers have an insurance policy with the type code \"Deputy\" or \"Uniform\"? Return the customer details.", "output": "SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.policy_type_code = \"Deputy\" OR t1.policy_type_code = \"Uniform\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customers have an insurance policy with the type code \"Deputy\" or \"Uniform\"? Return the customer details.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1535, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all the customers and staff members.", "output": "SELECT customer_details FROM customers UNION SELECT staff_details FROM staff", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all the customers and staff members.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1536, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the customers and staff members?", "output": "SELECT customer_details FROM customers UNION SELECT staff_details FROM staff", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the customers and staff members?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1537, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of records of each policy type and its type code.", "output": "SELECT policy_type_code , count(*) FROM policies GROUP BY policy_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of records of each policy type and its type code.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1538, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each policy type, return its type code and its count in the record.", "output": "SELECT policy_type_code , count(*) FROM policies GROUP BY policy_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each policy type, return its type code and its count in the record.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1539, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the customer that has been involved in the most policies.", "output": "SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id GROUP BY t2.customer_details ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the customer that has been involved in the most policies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1540, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customer have the most policies? Give me the customer details.", "output": "SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id GROUP BY t2.customer_details ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customer have the most policies? Give me the customer details.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1541, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description of the claim status \"Open\"?", "output": "SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = \"Open\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description of the claim status \"Open\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1542, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the description of the claim status \"Open\".", "output": "SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name = \"Open\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the description of the claim status \"Open\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1543, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct claim outcome codes are there?", "output": "SELECT count(DISTINCT claim_outcome_code) FROM claims_processing", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct claim outcome codes are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1544, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of distinct claim outcome codes.", "output": "SELECT count(DISTINCT claim_outcome_code) FROM claims_processing", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of distinct claim outcome codes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1545, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customer is associated with the latest policy?", "output": "SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.start_date = (SELECT max(start_date) FROM policies)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customer is associated with the latest policy?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_and_eClaims", "id": 1546, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the customer who started a policy most recently.", "output": "SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id = t2.customer_id WHERE t1.start_date = (SELECT max(start_date) FROM policies)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the customer who started a policy most recently.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1547, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of accounts.", "output": "SELECT count(*) FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1548, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many accounts are there?", "output": "SELECT count(*) FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many accounts are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1549, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers have opened an account?", "output": "SELECT count(DISTINCT customer_id) FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers have opened an account?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1550, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of customers who have an account.", "output": "SELECT count(DISTINCT customer_id) FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of customers who have an account.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1551, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the id, the date of account opened, the account name, and other account detail for all accounts.", "output": "SELECT account_id , date_account_opened , account_name , other_account_details FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the id, the date of account opened, the account name, and other account detail for all accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1552, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids, date opened, name, and other details for all accounts?", "output": "SELECT account_id , date_account_opened , account_name , other_account_details FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids, date opened, name, and other details for all accounts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1553, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the id, the account name, and other account details for all accounts by the customer with first name 'Meaghan'.", "output": "SELECT T1.account_id , T1.date_account_opened , T1.account_name , T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the id, the account name, and other account details for all accounts by the customer with first name 'Meaghan'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1554, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids, names, dates of opening, and other details for accounts corresponding to the customer with the first name \"Meaghan\"?", "output": "SELECT T1.account_id , T1.date_account_opened , T1.account_name , T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids, names, dates of opening, and other details for accounts corresponding to the customer with the first name \"Meaghan\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1555, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the account name and other account detail for all accounts by the customer with first name Meaghan and last name Keeling.", "output": "SELECT T1.account_name , T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Meaghan\" AND T2.customer_last_name = \"Keeling\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the account name and other account detail for all accounts by the customer with first name Meaghan and last name Keeling.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1556, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and other details for accounts corresponding to the customer named Meaghan Keeling?", "output": "SELECT T1.account_name , T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = \"Meaghan\" AND T2.customer_last_name = \"Keeling\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and other details for accounts corresponding to the customer named Meaghan Keeling?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1557, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the first name and last name for the customer with account name 900.", "output": "SELECT T2.customer_first_name , T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = \"900\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the first name and last name for the customer with account name 900.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1558, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names of customers with the account name 900?", "output": "SELECT T2.customer_first_name , T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.account_name = \"900\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full names of customers with the account name 900?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1559, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers don't have an account?", "output": "SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers don't have an account?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1560, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of customers who do not have an account.", "output": "SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of customers who do not have an account.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1561, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the unique first names, last names, and phone numbers for all customers with any account.", "output": "SELECT DISTINCT T1.customer_first_name , T1.customer_last_name , T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the unique first names, last names, and phone numbers for all customers with any account.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1562, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct first names, last names, and phone numbers for customers with accounts?", "output": "SELECT DISTINCT T1.customer_first_name , T1.customer_last_name , T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct first names, last names, and phone numbers for customers with accounts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1563, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show customer ids who don't have an account.", "output": "SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show customer ids who don't have an account.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1564, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the customer ids for customers who do not have an account?", "output": "SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the customer ids for customers who do not have an account?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1565, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many accounts does each customer have? List the number and customer id.", "output": "SELECT count(*) , customer_id FROM Accounts GROUP BY customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many accounts does each customer have? List the number and customer id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1566, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of accounts corresponding to each customer id.", "output": "SELECT count(*) , customer_id FROM Accounts GROUP BY customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of accounts corresponding to each customer id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1567, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the customer id, first and last name with most number of accounts.", "output": "SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the customer id, first and last name with most number of accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1568, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the id and full name of the customer with the most accounts.", "output": "SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the id and full name of the customer with the most accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1569, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show id, first name and last name for all customers and the number of accounts.", "output": "SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name , count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show id, first name and last name for all customers and the number of accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1570, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the the full names and ids for all customers, and how many accounts does each have?", "output": "SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name , count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the the full names and ids for all customers, and how many accounts does each have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1571, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show first name and id for all customers with at least 2 accounts.", "output": "SELECT T2.customer_first_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show first name and id for all customers with at least 2 accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1572, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names and ids for customers who have two or more accounts?", "output": "SELECT T2.customer_first_name , T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names and ids for customers who have two or more accounts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1573, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of customers.", "output": "SELECT count(*) FROM Customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1574, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of customers.", "output": "SELECT count(*) FROM Customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1575, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of customers for each gender.", "output": "SELECT gender , count(*) FROM Customers GROUP BY gender", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of customers for each gender.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1576, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers are there of each gender?", "output": "SELECT gender , count(*) FROM Customers GROUP BY gender", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers are there of each gender?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1577, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many transactions do we have?", "output": "SELECT count(*) FROM Financial_transactions", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many transactions do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1578, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of transactions.", "output": "SELECT count(*) FROM Financial_transactions", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of transactions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1579, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many transaction does each account have? Show the number and account id.", "output": "SELECT count(*) , account_id FROM Financial_transactions", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many transaction does each account have? Show the number and account id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1580, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of financial transactions that correspond to each account id.", "output": "SELECT count(*) , account_id FROM Financial_transactions", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of financial transactions that correspond to each account id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1581, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many transaction does account with name 337 have?", "output": "SELECT count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = \"337\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many transaction does account with name 337 have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1582, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of financial transactions that the account with the name 337 has.", "output": "SELECT count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id WHERE T2.account_name = \"337\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of financial transactions that the account with the name 337 has.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1583, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average, minimum, maximum, and total transaction amount?", "output": "SELECT avg(transaction_amount) , min(transaction_amount) , max(transaction_amount) , sum(transaction_amount) FROM Financial_transactions", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average, minimum, maximum, and total transaction amount?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1584, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the average, minimum, maximum, and total transaction amounts.", "output": "SELECT avg(transaction_amount) , min(transaction_amount) , max(transaction_amount) , sum(transaction_amount) FROM Financial_transactions", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the average, minimum, maximum, and total transaction amounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1585, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show ids for all transactions whose amounts are greater than the average.", "output": "SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT avg(transaction_amount) FROM Financial_transactions)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show ids for all transactions whose amounts are greater than the average.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1586, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids for transactions that have an amount greater than the average amount of a transaction?", "output": "SELECT transaction_id FROM Financial_transactions WHERE transaction_amount > (SELECT avg(transaction_amount) FROM Financial_transactions)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids for transactions that have an amount greater than the average amount of a transaction?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1587, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the transaction types and the total amount of transactions.", "output": "SELECT transaction_type , sum(transaction_amount) FROM Financial_transactions GROUP BY transaction_type", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the transaction types and the total amount of transactions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1588, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are total transaction amounts for each transaction type?", "output": "SELECT transaction_type , sum(transaction_amount) FROM Financial_transactions GROUP BY transaction_type", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are total transaction amounts for each transaction type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1589, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the account name, id and the number of transactions for each account.", "output": "SELECT T2.account_name , T1.account_id , count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the account name, id and the number of transactions for each account.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1590, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names and ids of each account, as well as the number of transactions.", "output": "SELECT T2.account_name , T1.account_id , count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names and ids of each account, as well as the number of transactions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1591, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the account id with most number of transactions.", "output": "SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the account id with most number of transactions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1592, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the account with the most transactions?", "output": "SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the account with the most transactions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1593, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the account id and name with at least 4 transactions.", "output": "SELECT T1.account_id , T2.account_name FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id HAVING count(*) >= 4", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the account id and name with at least 4 transactions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1594, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and names of accounts with 4 or more transactions?", "output": "SELECT T1.account_id , T2.account_name FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id HAVING count(*) >= 4", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids and names of accounts with 4 or more transactions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1595, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all product sizes.", "output": "SELECT DISTINCT product_size FROM Products", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all product sizes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1596, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different product sizes?", "output": "SELECT DISTINCT product_size FROM Products", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different product sizes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1597, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all product colors.", "output": "SELECT DISTINCT product_color FROM Products", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all product colors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1598, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different product colors?", "output": "SELECT DISTINCT product_color FROM Products", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different product colors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1599, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the invoice number and the number of transactions for each invoice.", "output": "SELECT invoice_number , count(*) FROM Financial_transactions GROUP BY invoice_number", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the invoice number and the number of transactions for each invoice.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1600, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many transactions correspond to each invoice number?", "output": "SELECT invoice_number , count(*) FROM Financial_transactions GROUP BY invoice_number", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many transactions correspond to each invoice number?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1601, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the invoice number and invoice date for the invoice with most number of transactions?", "output": "SELECT T2.invoice_number , T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the invoice number and invoice date for the invoice with most number of transactions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1602, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the invoice number and invoice date corresponding to the invoice with the greatest number of transactions?", "output": "SELECT T2.invoice_number , T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the invoice number and invoice date corresponding to the invoice with the greatest number of transactions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1603, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many invoices do we have?", "output": "SELECT count(*) FROM Invoices", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many invoices do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1604, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of invoices.", "output": "SELECT count(*) FROM Invoices", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of invoices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1605, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show invoice dates and order id and details for all invoices.", "output": "SELECT T1.invoice_date , T1.order_id , T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show invoice dates and order id and details for all invoices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1606, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the invoice dates, order ids, and order details for all invoices?", "output": "SELECT T1.invoice_date , T1.order_id , T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the invoice dates, order ids, and order details for all invoices?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1607, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the order ids and the number of invoices for each order.", "output": "SELECT order_id , count(*) FROM Invoices GROUP BY order_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the order ids and the number of invoices for each order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1608, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many invoices correspond to each order id?", "output": "SELECT order_id , count(*) FROM Invoices GROUP BY order_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many invoices correspond to each order id?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1609, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the order id and order details for the order more than two invoices.", "output": "SELECT T2.order_id , T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id GROUP BY T2.order_id HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the order id and order details for the order more than two invoices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1610, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the order ids and details for orderes with two or more invoices.", "output": "SELECT T2.order_id , T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id GROUP BY T2.order_id HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the order ids and details for orderes with two or more invoices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1611, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the customer last name, id and phone number with most number of orders?", "output": "SELECT T2.customer_last_name , T1.customer_id , T2.phone_number FROM Orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the customer last name, id and phone number with most number of orders?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1612, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the last name, id and phone number of the customer who has made the greatest number of orders.", "output": "SELECT T2.customer_last_name , T1.customer_id , T2.phone_number FROM Orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the last name, id and phone number of the customer who has made the greatest number of orders.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1613, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all product names without an order.", "output": "SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all product names without an order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1614, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of products that have never been ordered?", "output": "SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of products that have never been ordered?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1615, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all product names and the total quantity ordered for each product name.", "output": "SELECT T2.product_name , sum(T1.product_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all product names and the total quantity ordered for each product name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1616, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different product names, and what is the sum of quantity ordered for each product?", "output": "SELECT T2.product_name , sum(T1.product_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different product names, and what is the sum of quantity ordered for each product?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1617, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the order ids and the number of items in each order.", "output": "SELECT order_id , count(*) FROM Order_items GROUP BY order_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the order ids and the number of items in each order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1618, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many order items correspond to each order id?", "output": "SELECT order_id , count(*) FROM Order_items GROUP BY order_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many order items correspond to each order id?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1619, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the product ids and the number of unique orders containing each product.", "output": "SELECT product_id , count(DISTINCT order_id) FROM Order_items GROUP BY product_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the product ids and the number of unique orders containing each product.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1620, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct order ids correspond to each product?", "output": "SELECT product_id , count(DISTINCT order_id) FROM Order_items GROUP BY product_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct order ids correspond to each product?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1621, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all product names and the number of customers having an order on each product.", "output": "SELECT T2.product_name , count(*) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T3.order_id = T1.order_id GROUP BY T2.product_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all product names and the number of customers having an order on each product.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1622, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are teh names of the different products, as well as the number of customers who have ordered each product.", "output": "SELECT T2.product_name , count(*) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T3.order_id = T1.order_id GROUP BY T2.product_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are teh names of the different products, as well as the number of customers who have ordered each product.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1623, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show order ids and the number of products in each order.", "output": "SELECT order_id , count(DISTINCT product_id) FROM Order_items GROUP BY order_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show order ids and the number of products in each order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1624, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different products correspond to each order id?", "output": "SELECT order_id , count(DISTINCT product_id) FROM Order_items GROUP BY order_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different products correspond to each order id?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1625, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show order ids and the total quantity in each order.", "output": "SELECT order_id , sum(product_quantity) FROM Order_items GROUP BY order_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show order ids and the total quantity in each order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1626, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the order ids for all orders, as well as the total product quantity in each.", "output": "SELECT order_id , sum(product_quantity) FROM Order_items GROUP BY order_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the order ids for all orders, as well as the total product quantity in each.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1627, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many products were not included in any order?", "output": "SELECT count(*) FROM products WHERE product_id NOT IN ( SELECT product_id FROM Order_items )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many products were not included in any order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_invoices", "id": 1628, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of products that were never ordered.", "output": "SELECT count(*) FROM products WHERE product_id NOT IN ( SELECT product_id FROM Order_items )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of products that were never ordered.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1629, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many churches opened before 1850 are there?", "output": "SELECT count(*) FROM Church WHERE Open_Date < 1850", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many churches opened before 1850 are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1630, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name, open date, and organizer for all churches.", "output": "SELECT name , open_date , organized_by FROM Church", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name, open date, and organizer for all churches.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1631, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all church names in descending order of opening date.", "output": "SELECT name FROM church ORDER BY open_date DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all church names in descending order of opening date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1632, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the opening year in whcih at least two churches opened.", "output": "SELECT open_date FROM church GROUP BY open_date HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the opening year in whcih at least two churches opened.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1633, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the organizer and name for churches that opened between 1830 and 1840.", "output": "SELECT organized_by , name FROM church WHERE open_date BETWEEN 1830 AND 1840", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the organizer and name for churches that opened between 1830 and 1840.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1634, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all opening years and the number of churches that opened in that year.", "output": "SELECT open_date , count(*) FROM church GROUP BY open_date", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all opening years and the number of churches that opened in that year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1635, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name and opening year for three churches that opened most recently.", "output": "SELECT name , open_date FROM church ORDER BY open_date DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name and opening year for three churches that opened most recently.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1636, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many female people are older than 30 in our record?", "output": "SELECT count(*) FROM people WHERE is_male = 'F' AND age > 30", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many female people are older than 30 in our record?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1637, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the country where people older than 30 and younger than 25 are from.", "output": "SELECT country FROM people WHERE age < 25 INTERSECT SELECT country FROM people WHERE age > 30", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the country where people older than 30 and younger than 25 are from.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1638, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the minimum, maximum, and average age for all people.", "output": "SELECT min(age) , max(age) , avg(age) FROM people", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the minimum, maximum, and average age for all people.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1639, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name and country for all people whose age is smaller than the average.", "output": "SELECT name , country FROM people WHERE age < (SELECT avg(age) FROM people)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name and country for all people whose age is smaller than the average.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1640, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the pair of male and female names in all weddings after year 2014", "output": "SELECT T2.name , T3.name FROM wedding AS T1 JOIN people AS T2 ON T1.male_id = T2.people_id JOIN people AS T3 ON T1.female_id = T3.people_id WHERE T1.year > 2014", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the pair of male and female names in all weddings after year 2014,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1641, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name and age for all male people who don't have a wedding.", "output": "SELECT name , age FROM people WHERE is_male = 'T' AND people_id NOT IN (SELECT male_id FROM wedding)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name and age for all male people who don't have a wedding.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1642, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all church names except for those that had a wedding in year 2015.", "output": "SELECT name FROM church EXCEPT SELECT T1.name FROM church AS T1 JOIN wedding AS T2 ON T1.church_id = T2.church_id WHERE T2.year = 2015", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all church names except for those that had a wedding in year 2015.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1643, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all church names that have hosted least two weddings.", "output": "SELECT T1.name FROM church AS T1 JOIN wedding AS T2 ON T1.church_id = T2.church_id GROUP BY T1.church_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all church names that have hosted least two weddings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1644, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names for all females from Canada having a wedding in year 2016.", "output": "SELECT T2.name FROM wedding AS T1 JOIN people AS T2 ON T1.female_id = T2.people_id WHERE T1.year = 2016 AND T2.is_male = 'F' AND T2.country = 'Canada'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names for all females from Canada having a wedding in year 2016.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1645, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many weddings are there in year 2016?", "output": "SELECT count(*) FROM wedding WHERE YEAR = 2016", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many weddings are there in year 2016?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1646, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the church names for the weddings of all people older than 30.", "output": "SELECT T4.name FROM wedding AS T1 JOIN people AS T2 ON T1.male_id = T2.people_id JOIN people AS T3 ON T1.female_id = T3.people_id JOIN church AS T4 ON T4.church_id = T1.church_id WHERE T2.age > 30 OR T3.age > 30", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the church names for the weddings of all people older than 30.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1647, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all countries and the number of people from each country.", "output": "SELECT country , count(*) FROM people GROUP BY country", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all countries and the number of people from each country.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wedding", "id": 1648, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many churches have a wedding in year 2016?", "output": "SELECT COUNT (DISTINCT church_id) FROM wedding WHERE YEAR = 2016", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many churches have a wedding in year 2016?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1649, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many artists do we have?", "output": "SELECT count(*) FROM artist", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: How many artists do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1650, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of artists.", "output": "SELECT count(*) FROM artist", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Count the number of artists.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1651, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all artist name, age, and country ordered by the yeared they joined.", "output": "SELECT name , age , country FROM artist ORDER BY Year_Join", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Show all artist name, age, and country ordered by the yeared they joined.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1652, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names, ages, and countries of artists, sorted by the year they joined?", "output": "SELECT name , age , country FROM artist ORDER BY Year_Join", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: What are the names, ages, and countries of artists, sorted by the year they joined?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1653, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all distinct country for artists?", "output": "SELECT DISTINCT country FROM artist", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: What are all distinct country for artists?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1654, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the different countries for artists.", "output": "SELECT DISTINCT country FROM artist", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Return the different countries for artists.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1655, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all artist names and the year joined who are not from United States.", "output": "SELECT name , year_join FROM artist WHERE country != 'United States'", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Show all artist names and the year joined who are not from United States.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1656, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and year of joining for artists that do not have the country \"United States\"?", "output": "SELECT name , year_join FROM artist WHERE country != 'United States'", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: What are the names and year of joining for artists that do not have the country \"United States\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1657, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many artists are above age 46 and joined after 1990?", "output": "SELECT count(*) FROM artist WHERE age > 46 AND year_join > 1990", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: How many artists are above age 46 and joined after 1990?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1658, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of artists who are older than 46 and joined after 1990.", "output": "SELECT count(*) FROM artist WHERE age > 46 AND year_join > 1990", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Count the number of artists who are older than 46 and joined after 1990.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1659, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average and minimum age of all artists from United States.", "output": "SELECT avg(age) , min(age) FROM artist WHERE country = 'United States'", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: What is the average and minimum age of all artists from United States.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1660, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the average and minimum ages across artists from the United States.", "output": "SELECT avg(age) , min(age) FROM artist WHERE country = 'United States'", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Return the average and minimum ages across artists from the United States.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1661, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the artist who joined latest?", "output": "SELECT name FROM artist ORDER BY year_join DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: What is the name of the artist who joined latest?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1662, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name of the artist who has the latest join year.", "output": "SELECT name FROM artist ORDER BY year_join DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Return the name of the artist who has the latest join year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1663, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many exhibition are there in year 2005 or after?", "output": "SELECT count(*) FROM exhibition WHERE YEAR >= 2005", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: How many exhibition are there in year 2005 or after?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1664, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of exhibitions that happened in or after 2005.", "output": "SELECT count(*) FROM exhibition WHERE YEAR >= 2005", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Count the number of exhibitions that happened in or after 2005.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1665, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show theme and year for all exhibitions with ticket prices lower than 15.", "output": "SELECT theme , YEAR FROM exhibition WHERE ticket_price < 15", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Show theme and year for all exhibitions with ticket prices lower than 15.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1666, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the theme and year for all exhibitions that have a ticket price under 15?", "output": "SELECT theme , YEAR FROM exhibition WHERE ticket_price < 15", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: What are the theme and year for all exhibitions that have a ticket price under 15?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1667, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all artist names and the number of exhibitions for each artist.", "output": "SELECT T2.name , count(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Show all artist names and the number of exhibitions for each artist.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1668, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many exhibitions has each artist had?", "output": "SELECT T2.name , count(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: How many exhibitions has each artist had?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1669, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and country for the artist with most number of exhibitions?", "output": "SELECT T2.name , T2.country FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: What is the name and country for the artist with most number of exhibitions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1670, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name and country corresponding to the artist who has had the most exhibitions.", "output": "SELECT T2.name , T2.country FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Return the name and country corresponding to the artist who has had the most exhibitions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1671, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names for artists without any exhibition.", "output": "SELECT name FROM artist WHERE artist_id NOT IN (SELECT artist_id FROM exhibition)", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Show names for artists without any exhibition.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1672, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of artists that have not had any exhibitions?", "output": "SELECT name FROM artist WHERE artist_id NOT IN (SELECT artist_id FROM exhibition)", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: What are the names of artists that have not had any exhibitions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1673, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the theme and artist name for the exhibition with a ticket price higher than the average?", "output": "SELECT T1.theme , T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.ticket_price > (SELECT avg(ticket_price) FROM exhibition)", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: What is the theme and artist name for the exhibition with a ticket price higher than the average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1674, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of artists and the themes of their exhibitions that had a ticket price higher than average.", "output": "SELECT T1.theme , T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.ticket_price > (SELECT avg(ticket_price) FROM exhibition)", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Return the names of artists and the themes of their exhibitions that had a ticket price higher than average.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1675, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average, minimum, and maximum ticket prices for exhibitions for all years before 2009.", "output": "SELECT avg(ticket_price) , min(ticket_price) , max(ticket_price) FROM exhibition WHERE YEAR < 2009", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Show the average, minimum, and maximum ticket prices for exhibitions for all years before 2009.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1676, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average, minimum, and maximum ticket prices for exhibitions that happened prior to 2009?", "output": "SELECT avg(ticket_price) , min(ticket_price) , max(ticket_price) FROM exhibition WHERE YEAR < 2009", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: What are the average, minimum, and maximum ticket prices for exhibitions that happened prior to 2009?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1677, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show theme and year for all exhibitions in an descending order of ticket price.", "output": "SELECT theme , YEAR FROM exhibition ORDER BY ticket_price DESC", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Show theme and year for all exhibitions in an descending order of ticket price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1678, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the themes and years for exhibitions, sorted by ticket price descending?", "output": "SELECT theme , YEAR FROM exhibition ORDER BY ticket_price DESC", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: What are the themes and years for exhibitions, sorted by ticket price descending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1679, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the theme, date, and attendance for the exhibition in year 2004?", "output": "SELECT T2.theme , T1.date , T1.attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T2.year = 2004", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: What is the theme, date, and attendance for the exhibition in year 2004?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1680, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the themes, dates, and attendance for exhibitions that happened in 2004.", "output": "SELECT T2.theme , T1.date , T1.attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T2.year = 2004", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Return the themes, dates, and attendance for exhibitions that happened in 2004.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1681, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all artist names who didn't have an exhibition in 2004.", "output": "SELECT name FROM artist EXCEPT SELECT T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.year = 2004", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Show all artist names who didn't have an exhibition in 2004.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1682, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of artists who did not have an exhibition in 2004?", "output": "SELECT name FROM artist EXCEPT SELECT T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.year = 2004", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: What are the names of artists who did not have an exhibition in 2004?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1683, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the theme for exhibitions with both records of an attendance below 100 and above 500.", "output": "SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance < 100 INTERSECT SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 500", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Show the theme for exhibitions with both records of an attendance below 100 and above 500.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1684, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which themes have had corresponding exhibitions that have had attendance both below 100 and above 500?", "output": "SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance < 100 INTERSECT SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 500", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Which themes have had corresponding exhibitions that have had attendance both below 100 and above 500?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1685, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many exhibitions have a attendance more than 100 or have a ticket price below 10?", "output": "SELECT count(*) FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 100 OR T2.ticket_price < 10", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: How many exhibitions have a attendance more than 100 or have a ticket price below 10?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1686, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10.", "output": "SELECT count(*) FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 100 OR T2.ticket_price < 10", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1687, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all artist names with an average exhibition attendance over 200.", "output": "SELECT T3.name FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id JOIN artist AS T3 ON T3.artist_id = T2.artist_id GROUP BY T3.artist_id HAVING avg(T1.attendance) > 200", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: Show all artist names with an average exhibition attendance over 200.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "theme_gallery", "id": 1688, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of artist whose exhibitions draw over 200 attendees on average?", "output": "SELECT T3.name FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id JOIN artist AS T3 ON T3.artist_id = T2.artist_id GROUP BY T3.artist_id HAVING avg(T1.attendance) > 200", "input": "Based on \n# the table&column(database schema) information {'artist': ['Artist_ID', 'Name', 'Country', 'Year_Join', 'Age'], 'exhibition': ['Exhibition_ID', 'Year', 'Theme', 'Artist_ID', 'Ticket_Price'], 'exhibition_record': ['Exhibition_ID', 'Date', 'Attendance']} and \n# the user question: What are the names of artist whose exhibitions draw over 200 attendees on average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1689, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of the item whose title is \"orange\".", "output": "SELECT i_id FROM item WHERE title = \"orange\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id of the item whose title is \"orange\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1690, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all information in the item table.", "output": "SELECT * FROM item", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all information in the item table.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1691, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of reviews.", "output": "SELECT count(*) FROM review", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of reviews.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1692, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many users are there?", "output": "SELECT count(*) FROM useracct", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many users are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1693, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average and maximum rating of all reviews.", "output": "SELECT avg(rating) , max(rating) FROM review", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average and maximum rating of all reviews.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1694, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the highest rank of all reviews.", "output": "SELECT min(rank) FROM review", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the highest rank of all reviews.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1695, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different users wrote some reviews?", "output": "SELECT count(DISTINCT u_id) FROM review", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different users wrote some reviews?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1696, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different items were reviewed by some users?", "output": "SELECT count(DISTINCT i_id) FROM review", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different items were reviewed by some users?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1697, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of items that did not receive any review.", "output": "SELECT count(*) FROM item WHERE i_id NOT IN (SELECT i_id FROM review)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of items that did not receive any review.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1698, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of users who did not leave any review.", "output": "SELECT name FROM useracct WHERE u_id NOT IN (SELECT u_id FROM review)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of users who did not leave any review.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1699, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of goods that receive a rating of 10.", "output": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating = 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of goods that receive a rating of 10.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1700, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the titles of items whose rating is higher than the average review rating of all items.", "output": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating > (SELECT avg(rating) FROM review)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the titles of items whose rating is higher than the average review rating of all items.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1701, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the titles of items that received any rating below 5.", "output": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating < 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the titles of items that received any rating below 5.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1702, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the titles of items that received both a rating higher than 8 and a rating below 5.", "output": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating > 8 INTERSECT SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating < 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the titles of items that received both a rating higher than 8 and a rating below 5.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1703, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of items whose rank is higher than 3 and whose average rating is above 5.", "output": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rank > 3 INTERSECT SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id HAVING avg(T2.rating) > 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of items whose rank is higher than 3 and whose average rating is above 5.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1704, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the item with the lowest average rating.", "output": "SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY avg(T2.rating) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the item with the lowest average rating.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1705, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the titles of all items in alphabetic order .", "output": "SELECT title FROM item ORDER BY title", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the titles of all items in alphabetic order .,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1706, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the user who gives the most reviews.", "output": "SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the user who gives the most reviews.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1707, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and id of the item with the highest average rating.", "output": "SELECT T1.title , T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY avg(T2.rating) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and id of the item with the highest average rating.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1708, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and id of the good with the highest average rank.", "output": "SELECT T1.title , T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY avg(T2.rank) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and id of the good with the highest average rank.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1709, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each user, return the name and the average rating of reviews given by them.", "output": "SELECT T1.name , avg(T2.rating) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each user, return the name and the average rating of reviews given by them.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1710, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each user, find their name and the number of reviews written by them.", "output": "SELECT T1.name , count(*) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each user, find their name and the number of reviews written by them.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1711, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the user who gave the highest rating.", "output": "SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id ORDER BY T2.rating DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the user who gave the highest rating.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1712, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the source user with the highest average trust score.", "output": "SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.source_u_id GROUP BY T2.source_u_id ORDER BY avg(trust) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the source user with the highest average trust score.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1713, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find each target user's name and average trust score.", "output": "SELECT T1.name , avg(trust) FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id GROUP BY T2.target_u_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find each target user's name and average trust score.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1714, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the target user with the lowest trust score.", "output": "SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id ORDER BY trust LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the target user with the lowest trust score.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1715, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the items that did not receive any review.", "output": "SELECT title FROM item WHERE i_id NOT IN (SELECT i_id FROM review)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the items that did not receive any review.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1716, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of users who did not leave any review.", "output": "SELECT name FROM useracct WHERE u_id NOT IN (SELECT u_id FROM review)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of users who did not leave any review.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1717, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of users who did not write any review.", "output": "SELECT count(*) FROM useracct WHERE u_id NOT IN (SELECT u_id FROM review)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of users who did not write any review.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "epinions_1", "id": 1718, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of items without any review.", "output": "SELECT count(*) FROM item WHERE i_id NOT IN (SELECT i_id FROM review)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of items without any review.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "riding_club", "id": 1719, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many players are there?", "output": "SELECT count(*) FROM player", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many players are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "riding_club", "id": 1720, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of players in ascending order of votes.", "output": "SELECT Player_name FROM player ORDER BY Votes ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of players in ascending order of votes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "riding_club", "id": 1721, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the gender and occupation of players?", "output": "SELECT Gender , Occupation FROM player", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the gender and occupation of players?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "riding_club", "id": 1722, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name and residence for players whose occupation is not \"Researcher\".", "output": "SELECT Player_name , residence FROM player WHERE Occupation != \"Researcher\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name and residence for players whose occupation is not \"Researcher\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "riding_club", "id": 1723, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of sponsors of players whose residence is either \"Brandon\" or \"Birtle\".", "output": "SELECT Sponsor_name FROM player WHERE Residence = \"Brandon\" OR Residence = \"Birtle\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of sponsors of players whose residence is either \"Brandon\" or \"Birtle\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "riding_club", "id": 1724, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the player with the largest number of votes?", "output": "SELECT Player_name FROM player ORDER BY Votes DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the player with the largest number of votes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "riding_club", "id": 1725, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show different occupations along with the number of players in each occupation.", "output": "SELECT Occupation , COUNT(*) FROM player GROUP BY Occupation", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show different occupations along with the number of players in each occupation.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "riding_club", "id": 1726, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the most common occupation of players.", "output": "SELECT Occupation FROM player GROUP BY Occupation ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the most common occupation of players.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "riding_club", "id": 1727, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the residences that have at least two players.", "output": "SELECT Residence FROM player GROUP BY Residence HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the residences that have at least two players.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "riding_club", "id": 1728, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of players and names of their coaches.", "output": "SELECT T3.Player_name , T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of players and names of their coaches.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "riding_club", "id": 1729, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of players coached by the rank 1 coach.", "output": "SELECT T3.Player_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T2.Rank = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of players coached by the rank 1 coach.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "riding_club", "id": 1730, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names and genders of players with a coach starting after 2011.", "output": "SELECT T3.Player_name , T3.gender FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T1.Starting_year > 2011", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names and genders of players with a coach starting after 2011.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "riding_club", "id": 1731, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of players and names of their coaches in descending order of the votes of players.", "output": "SELECT T3.Player_name , T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID ORDER BY T3.Votes DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of players and names of their coaches in descending order of the votes of players.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "riding_club", "id": 1732, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of players that do not have coaches.", "output": "SELECT Player_name FROM player WHERE Player_ID NOT IN (SELECT Player_ID FROM player_coach)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of players that do not have coaches.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "riding_club", "id": 1733, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the residences that have both a player of gender \"M\" and a player of gender \"F\".", "output": "SELECT Residence FROM player WHERE gender = \"M\" INTERSECT SELECT Residence FROM player WHERE gender = \"F\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the residences that have both a player of gender \"M\" and a player of gender \"F\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "riding_club", "id": 1734, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many coaches does each club has? List the club id, name and the number of coaches.", "output": "SELECT T1.club_id , T1.club_name, count(*) FROM club AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many coaches does each club has? List the club id, name and the number of coaches.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "riding_club", "id": 1735, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many gold medals has the club with the most coaches won?", "output": "SELECT T1.club_id , T1.gold FROM match_result AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many gold medals has the club with the most coaches won?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1736, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many gymnasts are there?", "output": "SELECT count(*) FROM gymnast", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many gymnasts are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1737, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of gymnasts.", "output": "SELECT count(*) FROM gymnast", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of gymnasts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1738, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the total points of gymnasts in descending order.", "output": "SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the total points of gymnasts in descending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1739, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the total points for all gymnasts, ordered by total points descending?", "output": "SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the total points for all gymnasts, ordered by total points descending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1740, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the total points of gymnasts in descending order of floor exercise points.", "output": "SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the total points of gymnasts in descending order of floor exercise points.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1741, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the total points of gymnasts, ordered by their floor exercise points descending?", "output": "SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the total points of gymnasts, ordered by their floor exercise points descending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1742, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average horizontal bar points for all gymnasts?", "output": "SELECT avg(Horizontal_Bar_Points) FROM gymnast", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average horizontal bar points for all gymnasts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1743, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the average horizontal bar points across all gymnasts.", "output": "SELECT avg(Horizontal_Bar_Points) FROM gymnast", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the average horizontal bar points across all gymnasts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1744, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of people in ascending alphabetical order?", "output": "SELECT Name FROM People ORDER BY Name ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of people in ascending alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1745, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of people, ordered alphabetically.", "output": "SELECT Name FROM People ORDER BY Name ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names of people, ordered alphabetically.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1746, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of gymnasts?", "output": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of gymnasts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1747, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of the gymnasts.", "output": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names of the gymnasts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1748, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of gymnasts whose hometown is not \"Santo Domingo\"?", "output": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown != \"Santo Domingo\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of gymnasts whose hometown is not \"Santo Domingo\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1749, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of gymnasts who did not grow up in Santo Domingo.", "output": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown != \"Santo Domingo\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names of gymnasts who did not grow up in Santo Domingo.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1750, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the age of the tallest person?", "output": "SELECT Age FROM people ORDER BY Height DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the age of the tallest person?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1751, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the age of the person with the greatest height.", "output": "SELECT Age FROM people ORDER BY Height DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the age of the person with the greatest height.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1752, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of the top 5 oldest people.", "output": "SELECT Name FROM People ORDER BY Age DESC LIMIT 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of the top 5 oldest people.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1753, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the five oldest people?", "output": "SELECT Name FROM People ORDER BY Age DESC LIMIT 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the five oldest people?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1754, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total point count of the youngest gymnast?", "output": "SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total point count of the youngest gymnast?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1755, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the total points of the gymnast with the lowest age.", "output": "SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the total points of the gymnast with the lowest age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1756, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average age of all gymnasts?", "output": "SELECT avg(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average age of all gymnasts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1757, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the average age across all gymnasts.", "output": "SELECT avg(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the average age across all gymnasts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1758, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct hometowns of gymnasts with total points more than 57.5?", "output": "SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct hometowns of gymnasts with total points more than 57.5?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1759, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the different hometowns of gymnasts that have a total point score of above 57.5.", "output": "SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the different hometowns of gymnasts that have a total point score of above 57.5.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1760, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the hometowns of gymnasts and the corresponding number of gymnasts?", "output": "SELECT T2.Hometown , COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the hometowns of gymnasts and the corresponding number of gymnasts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1761, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many gymnasts are from each hometown?", "output": "SELECT T2.Hometown , COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many gymnasts are from each hometown?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1762, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most common hometown of gymnasts?", "output": "SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most common hometown of gymnasts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1763, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the hometown that is most common among gymnasts.", "output": "SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the hometown that is most common among gymnasts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1764, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the hometowns that are shared by at least two gymnasts?", "output": "SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the hometowns that are shared by at least two gymnasts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1765, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the hometowns from which two or more gymnasts are from.", "output": "SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the hometowns from which two or more gymnasts are from.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1766, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of gymnasts in ascending order by their heights.", "output": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of gymnasts in ascending order by their heights.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1767, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of gymnasts, ordered by their heights ascending?", "output": "SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of gymnasts, ordered by their heights ascending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1768, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the distinct hometowns that are not associated with any gymnast.", "output": "SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the distinct hometowns that are not associated with any gymnast.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1769, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "From which hometowns did no gymnasts come from?", "output": "SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: From which hometowns did no gymnasts come from?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1770, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the hometowns shared by people older than 23 and younger than 20.", "output": "SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the hometowns shared by people older than 23 and younger than 20.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1771, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "From which hometowns did both people older than 23 and younger than 20 come from?", "output": "SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: From which hometowns did both people older than 23 and younger than 20 come from?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1772, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct hometowns did these people have?", "output": "SELECT count(DISTINCT Hometown) FROM people", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct hometowns did these people have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1773, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different hometowns of these people.", "output": "SELECT count(DISTINCT Hometown) FROM people", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of different hometowns of these people.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1774, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ages of gymnasts in descending order of total points.", "output": "SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the ages of gymnasts in descending order of total points.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gymnast", "id": 1775, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ages of the gymnasts, ordered descending by their total points?", "output": "SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ages of the gymnasts, ordered descending by their total points?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1776, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total savings balance of all accounts except the account with name \u2018Brown\u2019.", "output": "SELECT sum(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name != 'Brown'", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the total savings balance of all accounts except the account with name \u2018Brown\u2019.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1777, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total balance of savings accounts not belonging to someone with the name Brown?", "output": "SELECT sum(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name != 'Brown'", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What is the total balance of savings accounts not belonging to someone with the name Brown?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1778, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many accounts are there in total?", "output": "SELECT count(*) FROM accounts", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: How many accounts are there in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1779, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of accounts.", "output": "SELECT count(*) FROM accounts", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Count the number of accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1780, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total checking balance in all accounts?", "output": "SELECT sum(balance) FROM checking", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What is the total checking balance in all accounts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1781, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total balance across checking accounts.", "output": "SELECT sum(balance) FROM checking", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the total balance across checking accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1782, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average checking balance.", "output": "SELECT avg(balance) FROM checking", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the average checking balance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1783, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average balance in checking accounts?", "output": "SELECT avg(balance) FROM checking", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What is the average balance in checking accounts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1784, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many accounts have a savings balance above the average savings balance?", "output": "SELECT count(*) FROM savings WHERE balance > (SELECT avg(balance) FROM savings)", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: How many accounts have a savings balance above the average savings balance?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1785, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of accounts with a savings balance that is higher than the average savings balance.", "output": "SELECT count(*) FROM savings WHERE balance > (SELECT avg(balance) FROM savings)", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the number of accounts with a savings balance that is higher than the average savings balance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1786, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and id of accounts whose checking balance is below the maximum checking balance.", "output": "SELECT T1.custid , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT max(balance) FROM checking)", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the name and id of accounts whose checking balance is below the maximum checking balance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1787, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the customer id and name corresponding to accounts with a checking balance less than the largest checking balance?", "output": "SELECT T1.custid , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT max(balance) FROM checking)", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What are the customer id and name corresponding to accounts with a checking balance less than the largest checking balance?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1788, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the checking balance of the account whose owner\u2019s name contains the substring \u2018ee\u2019?", "output": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%'", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What is the checking balance of the account whose owner\u2019s name contains the substring \u2018ee\u2019?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1789, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the balance of the checking account belonging to an owner whose name contains 'ee'.", "output": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%'", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the balance of the checking account belonging to an owner whose name contains 'ee'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1790, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the checking balance and saving balance in the Brown\u2019s account.", "output": "SELECT T2.balance , T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T1.name = 'Brown'", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the checking balance and saving balance in the Brown\u2019s account.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1791, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the checking and savings balances in accounts belonging to Brown?", "output": "SELECT T2.balance , T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T1.name = 'Brown'", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What are the checking and savings balances in accounts belonging to Brown?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1792, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance.", "output": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT avg(balance) FROM checking) INTERSECT SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT avg(balance) FROM savings)", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1793, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of accounts with checking balances greater than the average checking balance and savings balances below the average savings balance?", "output": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT avg(balance) FROM checking) INTERSECT SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT avg(balance) FROM savings)", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What are the names of accounts with checking balances greater than the average checking balance and savings balances below the average savings balance?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1794, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the checking balance of the accounts whose savings balance is higher than the average savings balance.", "output": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT avg(balance) FROM savings))", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the checking balance of the accounts whose savings balance is higher than the average savings balance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1795, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the balances of checking accounts belonging to people with savings balances greater than the average savings balance?", "output": "SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT avg(balance) FROM savings))", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What are the balances of checking accounts belonging to people with savings balances greater than the average savings balance?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1796, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all customers\u2019 names in the alphabetical order.", "output": "SELECT name FROM accounts ORDER BY name", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: List all customers\u2019 names in the alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1797, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the customers in alphabetical order?", "output": "SELECT name FROM accounts ORDER BY name", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What are the names of all the customers in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1798, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of account that has the lowest total checking and saving balance.", "output": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the name of account that has the lowest total checking and saving balance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1799, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name corresponding to the accoung with the lowest sum of checking and savings balances?", "output": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What is the name corresponding to the accoung with the lowest sum of checking and savings balances?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1800, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance.", "output": "SELECT T1.name , T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance > (SELECT avg(balance) FROM savings)", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1801, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance?", "output": "SELECT T1.name , T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance > (SELECT avg(balance) FROM savings)", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1802, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and checking balance of the account with the lowest savings balance.", "output": "SELECT T1.name , T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the name and checking balance of the account with the lowest savings balance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1803, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and balances of checking accounts belonging to the customer with the lowest savings balance?", "output": "SELECT T1.name , T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What are the names and balances of checking accounts belonging to the customer with the lowest savings balance?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1804, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of checking accounts for each account name.", "output": "SELECT count(*) , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the number of checking accounts for each account name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1805, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of customers with accounts, and how many checking accounts do each of them have?", "output": "SELECT count(*) , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What are the names of customers with accounts, and how many checking accounts do each of them have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1806, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total saving balance for each account name.", "output": "SELECT sum(T2.balance) , T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the total saving balance for each account name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1807, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of customers with accounts, and what are the total savings balances for each?", "output": "SELECT sum(T2.balance) , T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid GROUP BY T1.name", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What are the names of customers with accounts, and what are the total savings balances for each?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1808, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of accounts whose checking balance is below the average checking balance.", "output": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT avg(balance) FROM checking)", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the name of accounts whose checking balance is below the average checking balance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1809, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of customers with checking balances lower than the average checking balance?", "output": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT avg(balance) FROM checking)", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What are the names of customers with checking balances lower than the average checking balance?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1810, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the saving balance of the account with the highest checking balance.", "output": "SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the saving balance of the account with the highest checking balance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1811, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the savings balance of the account belonging to the customer with the highest checking balance?", "output": "SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What is the savings balance of the account belonging to the customer with the highest checking balance?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1812, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total checking and saving balance of all accounts sorted by the total balance in ascending order.", "output": "SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the total checking and saving balance of all accounts sorted by the total balance in ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1813, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the sum of checking and savings balances for all customers, ordered by the total balance?", "output": "SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T1.balance + T2.balance", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What is the sum of checking and savings balances for all customers, ordered by the total balance?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1814, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and checking balance of the account with the lowest saving balance.", "output": "SELECT T2.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the name and checking balance of the account with the lowest saving balance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1815, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and checking balance of the account which has the lowest savings balance?", "output": "SELECT T2.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What is the name and checking balance of the account which has the lowest savings balance?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1816, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name, checking balance and saving balance of all accounts in the bank.", "output": "SELECT T2.balance , T3.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the name, checking balance and saving balance of all accounts in the bank.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1817, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names, checking balances, and savings balances for all customers?", "output": "SELECT T2.balance , T3.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What are the names, checking balances, and savings balances for all customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1818, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T2.balance , T3.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance DESC", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1819, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending?", "output": "SELECT T2.balance , T3.balance , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance DESC", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1820, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of accounts whose checking balance is higher than corresponding saving balance.", "output": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T2.balance > T3.balance", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the name of accounts whose checking balance is higher than corresponding saving balance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1821, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of customers with a higher checking balance than savings balance?", "output": "SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T2.balance > T3.balance", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What are the names of customers with a higher checking balance than savings balance?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1822, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.", "output": "SELECT T1.name , T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance < T2.balance", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1823, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT T1.name , T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T3.balance < T2.balance", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1824, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order.", "output": "SELECT T1.name , T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T2.balance DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "small_bank_1", "id": 1825, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are names and savings balances of the three accounts with the highest savings balances?", "output": "SELECT T1.name , T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T2.balance DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'ACCOUNTS': ['custid', 'name'], 'SAVINGS': ['custid', 'balance'], 'CHECKING': ['custid', 'balance']} and \n# the user question: What are names and savings balances of the three accounts with the highest savings balances?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1826, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many main stream browsers whose market share is at least 5 exist?", "output": "SELECT count(*) FROM browser WHERE market_share >= 5", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: How many main stream browsers whose market share is at least 5 exist?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1827, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of browsers in descending order by market share.", "output": "SELECT name FROM browser ORDER BY market_share DESC", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: List the name of browsers in descending order by market share.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1828, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the ids, names and market shares of all browsers.", "output": "SELECT id , name , market_share FROM browser", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: List the ids, names and market shares of all browsers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1829, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum, minimum and average market share of the listed browsers?", "output": "SELECT max(market_share) , min(market_share) , avg(market_share) FROM browser", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: What is the maximum, minimum and average market share of the listed browsers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1830, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id and market share of the browser Safari?", "output": "SELECT id , market_share FROM browser WHERE name = 'Safari'", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: What is the id and market share of the browser Safari?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1831, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection?", "output": "SELECT name , operating_system FROM web_client_accelerator WHERE CONNECTION != 'Broadband'", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1832, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ?", "output": "SELECT T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id JOIN web_client_accelerator AS T3 ON T2.accelerator_id = T3.id WHERE T3.name = 'CProxy' AND T2.compatible_since_year > 1998", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1833, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and names of the web accelerators that are compatible with two or more browsers?", "output": "SELECT T1.id , T1.Name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id GROUP BY T1.id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: What are the ids and names of the web accelerators that are compatible with two or more browsers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1834, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id and name of the browser that is compatible with the most web accelerators?", "output": "SELECT T1.id , T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: What is the id and name of the browser that is compatible with the most web accelerators?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1835, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible?", "output": "SELECT T1.compatible_since_year FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id WHERE T3.name = 'CACHEbox' AND T2.name = 'Internet Explorer'", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1836, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different kinds of clients are supported by the web clients accelerators?", "output": "SELECT count(DISTINCT client) FROM web_client_accelerator", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: How many different kinds of clients are supported by the web clients accelerators?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1837, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many accelerators are not compatible with the browsers listed ?", "output": "SELECT count(*) FROM web_client_accelerator WHERE id NOT IN ( SELECT accelerator_id FROM accelerator_compatible_browser );", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: How many accelerators are not compatible with the browsers listed ?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1838, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What distinct accelerator names are compatible with the browswers that have market share higher than 15?", "output": "SELECT DISTINCT T1.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.market_share > 15;", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: What distinct accelerator names are compatible with the browswers that have market share higher than 15?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1839, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'.", "output": "SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'CACHEbox' INTERSECT SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T1.name = 'Fasterfox'", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1840, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'.", "output": "SELECT name , operating_system FROM web_client_accelerator EXCEPT SELECT T1.name , T1.operating_system FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id = T1.id JOIN browser AS T3 ON T2.browser_id = T3.id WHERE T3.name = 'Opera'", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1841, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which accelerator name contains substring \"Opera\"?", "output": "SELECT name FROM web_client_accelerator WHERE name LIKE \"%Opera%\"", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: Which accelerator name contains substring \"Opera\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1842, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of web accelerators used for each Operating system.", "output": "SELECT Operating_system , count(*) FROM web_client_accelerator GROUP BY Operating_system", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: Find the number of web accelerators used for each Operating system.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "browser_web", "id": 1843, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "give me names of all compatible browsers and accelerators in the descending order of compatible year", "output": "SELECT T2.name , T3.name FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id = T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id = T3.id ORDER BY T1.compatible_since_year DESC", "input": "Based on \n# the table&column(database schema) information {'Web_client_accelerator': ['id', 'name', 'Operating_system', 'Client', 'Connection'], 'browser': ['id', 'name', 'market_share'], 'accelerator_compatible_browser': ['accelerator_id', 'browser_id', 'compatible_since_year']} and \n# the user question: give me names of all compatible browsers and accelerators in the descending order of compatible year,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1844, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many wrestlers are there?", "output": "SELECT count(*) FROM wrestler", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: How many wrestlers are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1845, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of wrestlers.", "output": "SELECT count(*) FROM wrestler", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: Count the number of wrestlers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1846, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of wrestlers in descending order of days held.", "output": "SELECT Name FROM wrestler ORDER BY Days_held DESC", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: List the names of wrestlers in descending order of days held.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1847, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the wrestlers, ordered descending by days held?", "output": "SELECT Name FROM wrestler ORDER BY Days_held DESC", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: What are the names of the wrestlers, ordered descending by days held?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1848, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the wrestler with the fewest days held?", "output": "SELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: What is the name of the wrestler with the fewest days held?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1849, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name of the wrestler who had the lowest number of days held.", "output": "SELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: Return the name of the wrestler who had the lowest number of days held.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1850, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct reigns of wrestlers whose location is not \"Tokyo,Japan\" ?", "output": "SELECT DISTINCT Reign FROM wrestler WHERE LOCATION != \"Tokyo , Japan\"", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: What are the distinct reigns of wrestlers whose location is not \"Tokyo,Japan\" ?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1851, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the different reigns of wrestlers who are not located in Tokyo, Japan.", "output": "SELECT DISTINCT Reign FROM wrestler WHERE LOCATION != \"Tokyo , Japan\"", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: Give the different reigns of wrestlers who are not located in Tokyo, Japan.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1852, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and location of the wrestlers?", "output": "SELECT Name , LOCATION FROM wrestler", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: What are the names and location of the wrestlers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1853, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the names and locations of all wrestlers.", "output": "SELECT Name , LOCATION FROM wrestler", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: Give the names and locations of all wrestlers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1854, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the elimination moves of wrestlers whose team is \"Team Orton\"?", "output": "SELECT Elimination_Move FROM Elimination WHERE Team = \"Team Orton\"", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: What are the elimination moves of wrestlers whose team is \"Team Orton\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1855, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the elimination movies of wrestlers on Team Orton.", "output": "SELECT Elimination_Move FROM Elimination WHERE Team = \"Team Orton\"", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: Return the elimination movies of wrestlers on Team Orton.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1856, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of wrestlers and the elimination moves?", "output": "SELECT T2.Name , T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: What are the names of wrestlers and the elimination moves?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1857, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the names of wrestlers and their elimination moves.", "output": "SELECT T2.Name , T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: Give the names of wrestlers and their elimination moves.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1858, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of wrestlers and the teams in elimination in descending order of days held.", "output": "SELECT T2.Name , T1.Team FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: List the names of wrestlers and the teams in elimination in descending order of days held.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1859, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of wrestlers and their teams in elimination, ordered descending by days held?", "output": "SELECT T2.Name , T1.Team FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: What are the names of wrestlers and their teams in elimination, ordered descending by days held?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1860, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the time of elimination of the wrestlers with largest days held.", "output": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: List the time of elimination of the wrestlers with largest days held.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1861, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the time of elimination for the wrestler with the most days held?", "output": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: What is the time of elimination for the wrestler with the most days held?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1862, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show times of elimination of wrestlers with days held more than 50.", "output": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: Show times of elimination of wrestlers with days held more than 50.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1863, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the times of elimination for wrestlers with over 50 days held?", "output": "SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Days_held > 50", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: What are the times of elimination for wrestlers with over 50 days held?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1864, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show different teams in eliminations and the number of eliminations from each team.", "output": "SELECT Team , COUNT(*) FROM elimination GROUP BY Team", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: Show different teams in eliminations and the number of eliminations from each team.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1865, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many eliminations did each team have?", "output": "SELECT Team , COUNT(*) FROM elimination GROUP BY Team", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: How many eliminations did each team have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1866, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show teams that have suffered more than three eliminations.", "output": "SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: Show teams that have suffered more than three eliminations.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1867, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which teams had more than 3 eliminations?", "output": "SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*) > 3", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: Which teams had more than 3 eliminations?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1868, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the reign and days held of wrestlers.", "output": "SELECT Reign , Days_held FROM wrestler", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: Show the reign and days held of wrestlers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1869, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the reigns and days held of all wrestlers?", "output": "SELECT Reign , Days_held FROM wrestler", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: What are the reigns and days held of all wrestlers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1870, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of wrestlers days held less than 100?", "output": "SELECT Name FROM wrestler WHERE Days_held < 100", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: What are the names of wrestlers days held less than 100?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1871, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of wrestlers with fewer than 100 days held.", "output": "SELECT Name FROM wrestler WHERE Days_held < 100", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: Return the names of wrestlers with fewer than 100 days held.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1872, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the most common reigns of wrestlers.", "output": "SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: Please show the most common reigns of wrestlers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1873, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which reign is the most common among wrestlers?", "output": "SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: Which reign is the most common among wrestlers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1874, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the locations that are shared by more than two wrestlers.", "output": "SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: List the locations that are shared by more than two wrestlers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1875, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which locations are shared by more than two wrestlers?", "output": "SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*) > 2", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: Which locations are shared by more than two wrestlers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1876, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of wrestlers that have not been eliminated.", "output": "SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination)", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: List the names of wrestlers that have not been eliminated.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1877, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of wrestlers who have never been eliminated?", "output": "SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination)", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: What are the names of wrestlers who have never been eliminated?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1878, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the teams that have both wrestlers eliminated by \"Orton\" and wrestlers eliminated by \"Benjamin\".", "output": "SELECT Team FROM Elimination WHERE Eliminated_By = \"Orton\" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = \"Benjamin\"", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: Show the teams that have both wrestlers eliminated by \"Orton\" and wrestlers eliminated by \"Benjamin\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1879, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the teams that have both wrestlers eliminated by Orton and wrestlers eliminated by Benjamin?", "output": "SELECT Team FROM Elimination WHERE Eliminated_By = \"Orton\" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By = \"Benjamin\"", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: What are the teams that have both wrestlers eliminated by Orton and wrestlers eliminated by Benjamin?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1880, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of distinct teams that suffer elimination?", "output": "SELECT COUNT (DISTINCT team) FROM elimination", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: What is the number of distinct teams that suffer elimination?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1881, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different teams have had eliminated wrestlers?", "output": "SELECT COUNT (DISTINCT team) FROM elimination", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: How many different teams have had eliminated wrestlers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1882, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the times of elimination by \"Punk\" or \"Orton\".", "output": "SELECT TIME FROM elimination WHERE Eliminated_By = \"Punk\" OR Eliminated_By = \"Orton\"", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: Show the times of elimination by \"Punk\" or \"Orton\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wrestler", "id": 1883, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the times of elimination for any instances in which the elimination was done by Punk or Orton?", "output": "SELECT TIME FROM elimination WHERE Eliminated_By = \"Punk\" OR Eliminated_By = \"Orton\"", "input": "Based on \n# the table&column(database schema) information {'wrestler': ['Wrestler_ID', 'Name', 'Reign', 'Days_held', 'Location', 'Event'], 'Elimination': ['Elimination_ID', 'Wrestler_ID', 'Team', 'Eliminated_By', 'Elimination_Move', 'Time']} and \n# the user question: What are the times of elimination for any instances in which the elimination was done by Punk or Orton?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1884, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many schools are there?", "output": "SELECT count(*) FROM school", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many schools are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1885, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of schools.", "output": "SELECT count(*) FROM school", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of schools.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1886, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all school names in alphabetical order.", "output": "SELECT school_name FROM school ORDER BY school_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all school names in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1887, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name, location, mascot for all schools.", "output": "SELECT school_name , LOCATION , mascot FROM school", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name, location, mascot for all schools.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1888, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the total and average enrollment of all schools?", "output": "SELECT sum(enrollment) , avg(enrollment) FROM school", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the total and average enrollment of all schools?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1889, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the mascots for schools with enrollments above the average?", "output": "SELECT mascot FROM school WHERE enrollment > (SELECT avg(enrollment) FROM school)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the mascots for schools with enrollments above the average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1890, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of the school with the smallest enrollment.", "output": "SELECT school_name FROM school ORDER BY enrollment LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of the school with the smallest enrollment.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1891, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average, maximum, minimum enrollment of all schools.", "output": "SELECT avg(enrollment) , max(enrollment) , min(enrollment) FROM school", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the average, maximum, minimum enrollment of all schools.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1892, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show each county along with the number of schools and total enrollment in each county.", "output": "SELECT county , count(*) , sum(enrollment) FROM school GROUP BY county", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show each county along with the number of schools and total enrollment in each county.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1893, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many donors have endowment for school named \"Glenn\"?", "output": "SELECT count(DISTINCT T1.donator_name) FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = \"Glenn\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many donors have endowment for school named \"Glenn\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1894, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List each donator name and the amount of endowment in descending order of the amount of endowment.", "output": "SELECT donator_name , sum(amount) FROM endowment GROUP BY donator_name ORDER BY sum(amount) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List each donator name and the amount of endowment in descending order of the amount of endowment.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1895, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of the schools without any endowment.", "output": "SELECT school_name FROM school WHERE school_id NOT IN (SELECT school_id FROM endowment)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of the schools without any endowment.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1896, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the names of schools with an endowment amount smaller than or equal to 10.", "output": "SELECT T2.school_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T1.school_id HAVING sum(T1.amount) <= 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the names of schools with an endowment amount smaller than or equal to 10.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1897, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of donors who donated to both school \"Glenn\" and \"Triton.\"", "output": "SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn' INTERSECT SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Triton'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of donors who donated to both school \"Glenn\" and \"Triton.\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1898, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of all the donors except those whose donation amount less than 9.", "output": "SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount < 9", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of all the donors except those whose donation amount less than 9.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1899, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the amount and donor name for the largest amount of donation.", "output": "SELECT amount , donator_name FROM endowment ORDER BY amount DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the amount and donor name for the largest amount of donation.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1900, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many budgets are above 3000 in year 2001 or before?", "output": "SELECT count(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many budgets are above 3000 in year 2001 or before?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1901, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of budgets in year 2001 or before whose budgeted amount is greater than 3000", "output": "SELECT count(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of budgets in year 2001 or before whose budgeted amount is greater than 3000,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1902, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show each school name, its budgeted amount, and invested amount in year 2002 or after.", "output": "SELECT T2.school_name , T1.budgeted , T1.invested FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T1.year >= 2002", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show each school name, its budgeted amount, and invested amount in year 2002 or after.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1903, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all donor names.", "output": "SELECT DISTINCT donator_name FROM endowment", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all donor names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1904, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many budget record has a budget amount smaller than the invested amount?", "output": "SELECT count(*) FROM budget WHERE budgeted < invested", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many budget record has a budget amount smaller than the invested amount?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1905, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total budget amount for school \"Glenn\" in all years?", "output": "SELECT sum(T1.budgeted) FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total budget amount for school \"Glenn\" in all years?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1906, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10.", "output": "SELECT T2.school_name FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN endowment AS T3 ON T2.school_id = T3.school_id GROUP BY T2.school_name HAVING sum(T1.budgeted) > 100 OR sum(T3.amount) > 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1907, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of schools that have more than one donator with donation amount above 8.5.", "output": "SELECT T2.School_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T1.amount > 8.5 GROUP BY T1.school_id HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of schools that have more than one donator with donation amount above 8.5.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1908, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of schools that have more than one donator whose donation amount is less than 8.5.", "output": "SELECT count(*) FROM (SELECT * FROM endowment WHERE amount > 8.5 GROUP BY school_id HAVING count(*) > 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of schools that have more than one donator whose donation amount is less than 8.5.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_finance", "id": 1909, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T1.School_name , T1.Mascot , T1.IHSAA_Football_Class FROM school AS T1 JOIN budget AS T2 ON T1.school_id = T2.school_id WHERE Budgeted > 6000 OR YEAR < 2003 ORDER BY T2.total_budget_percent_invested , T2.total_budget_percent_budgeted", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1910, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many buildings are there?", "output": "SELECT count(*) FROM building", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many buildings are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1911, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name, street address, and number of floors for all buildings ordered by the number of floors.", "output": "SELECT name , street_address , floors FROM building ORDER BY floors", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name, street address, and number of floors for all buildings ordered by the number of floors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1912, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the tallest building?", "output": "SELECT name FROM building ORDER BY height_feet DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the tallest building?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1913, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average, maximum, and minimum number of floors for all buildings?", "output": "SELECT avg(floors) , max(floors) , min(floors) FROM building", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the average, maximum, and minimum number of floors for all buildings?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1914, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of buildings with a height above the average or a number of floors above the average.", "output": "SELECT count(*) FROM building WHERE height_feet > (SELECT avg(height_feet) FROM building) OR floors > (SELECT avg(floors) FROM building)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of buildings with a height above the average or a number of floors above the average.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1915, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of buildings with at least 200 feet of height and with at least 20 floors.", "output": "SELECT name FROM building WHERE height_feet >= 200 AND floors >= 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of buildings with at least 200 feet of height and with at least 20 floors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1916, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names and locations of institutions that are founded after 1990 and have the type \"Private\".", "output": "SELECT institution , LOCATION FROM institution WHERE founded > 1990 AND TYPE = 'Private'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names and locations of institutions that are founded after 1990 and have the type \"Private\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1917, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show institution types, along with the number of institutions and total enrollment for each type.", "output": "SELECT TYPE , count(*) , sum(enrollment) FROM institution GROUP BY TYPE", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show institution types, along with the number of institutions and total enrollment for each type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1918, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the institution type with the largest number of institutions.", "output": "SELECT TYPE FROM institution GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the institution type with the largest number of institutions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1919, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the institution type with an institution founded after 1990 and an institution with at least 1000 enrollment.", "output": "SELECT TYPE FROM institution WHERE founded > 1990 AND enrollment >= 1000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the institution type with an institution founded after 1990 and an institution with at least 1000 enrollment.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1920, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of buildings that do not have any institution.", "output": "SELECT name FROM building WHERE building_id NOT IN (SELECT building_id FROM institution)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name of buildings that do not have any institution.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1921, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of buildings except for those having an institution founded in 2003.", "output": "SELECT name FROM building EXCEPT SELECT T1.name FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id WHERE T2.founded = 2003", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of buildings except for those having an institution founded in 2003.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1922, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each building, show the name of the building and the number of institutions in it.", "output": "SELECT T1.name , count(*) FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id GROUP BY T1.building_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each building, show the name of the building and the number of institutions in it.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1923, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names and heights of buildings with at least two institutions founded after 1880.", "output": "SELECT T1.name , T1.height_feet FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id WHERE T2.founded > 1880 GROUP BY T1.building_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names and heights of buildings with at least two institutions founded after 1880.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1924, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all the distinct institution types.", "output": "SELECT DISTINCT TYPE FROM institution", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all the distinct institution types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1925, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show institution names along with the number of proteins for each institution.", "output": "SELECT T1.institution , count(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id GROUP BY T1.institution_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show institution names along with the number of proteins for each institution.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1926, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many proteins are associated with an institution founded after 1880 or an institution with type \"Private\"?", "output": "SELECT count(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id WHERE T1.founded > 1880 OR T1.type = 'Private'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many proteins are associated with an institution founded after 1880 or an institution with type \"Private\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1927, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the protein name and the institution name.", "output": "SELECT T2.protein_name , T1.institution FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the protein name and the institution name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1928, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many proteins are associated with an institution in a building with at least 20 floors?", "output": "SELECT count(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id JOIN building AS T3 ON T3.building_id = T1.building_id WHERE T3.floors >= 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many proteins are associated with an institution in a building with at least 20 floors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "protein_institute", "id": 1929, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many institutions do not have an associated protein in our record?", "output": "SELECT count(*) FROM institution WHERE institution_id NOT IN (SELECT institution_id FROM protein)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many institutions do not have an associated protein in our record?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1930, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all the locations where no cinema has capacity over 800.", "output": "SELECT LOCATION FROM cinema EXCEPT SELECT LOCATION FROM cinema WHERE capacity > 800", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all the locations where no cinema has capacity over 800.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1931, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all the locations where some cinemas were opened in both year 2010 and year 2011.", "output": "SELECT LOCATION FROM cinema WHERE openning_year = 2010 INTERSECT SELECT LOCATION FROM cinema WHERE openning_year = 2011", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all the locations where some cinemas were opened in both year 2010 and year 2011.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1932, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many cinema do we have?", "output": "SELECT count(*) FROM cinema", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many cinema do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1933, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of cinemas.", "output": "SELECT count(*) FROM cinema", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of cinemas.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1934, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show name, opening year, and capacity for each cinema.", "output": "SELECT name , openning_year , capacity FROM cinema", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show name, opening year, and capacity for each cinema.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1935, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the cinema name and location for cinemas with capacity above average.", "output": "SELECT name , LOCATION FROM cinema WHERE capacity > (SELECT avg(capacity) FROM cinema)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the cinema name and location for cinemas with capacity above average.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1936, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the locations with a cinema?", "output": "SELECT DISTINCT LOCATION FROM cinema", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the locations with a cinema?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1937, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct locations that has a cinema.", "output": "SELECT DISTINCT LOCATION FROM cinema", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the distinct locations that has a cinema.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1938, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all the cinema names and opening years in descending order of opening year.", "output": "SELECT name , openning_year FROM cinema ORDER BY openning_year DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all the cinema names and opening years in descending order of opening year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1939, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and location of the cinema with the largest capacity?", "output": "SELECT name , LOCATION FROM cinema ORDER BY capacity DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name and location of the cinema with the largest capacity?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1940, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average, minimum, and maximum capacity for all the cinemas opened in year 2011 or later.", "output": "SELECT avg(capacity) , min(capacity) , max(capacity) FROM cinema WHERE openning_year >= 2011", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the average, minimum, and maximum capacity for all the cinemas opened in year 2011 or later.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1941, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show each location and the number of cinemas there.", "output": "SELECT LOCATION , count(*) FROM cinema GROUP BY LOCATION", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show each location and the number of cinemas there.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1942, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the location with the most cinemas opened in year 2010 or later?", "output": "SELECT LOCATION FROM cinema WHERE openning_year >= 2010 GROUP BY LOCATION ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the location with the most cinemas opened in year 2010 or later?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1943, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all the locations with at least two cinemas with capacity above 300.", "output": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all the locations with at least two cinemas with capacity above 300.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1944, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which locations have 2 or more cinemas with capacity over 300?", "output": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which locations have 2 or more cinemas with capacity over 300?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1945, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the title and director for all films.", "output": "SELECT title , directed_by FROM film", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the title and director for all films.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1946, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the title and director of each film?", "output": "SELECT title , directed_by FROM film", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the title and director of each film?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1947, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all directors.", "output": "SELECT DISTINCT directed_by FROM film", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all directors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1948, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are all the directors?", "output": "SELECT DISTINCT directed_by FROM film", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who are all the directors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1949, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all directors along with the number of films directed by each director.", "output": "SELECT directed_by , count(*) FROM film GROUP BY directed_by", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all directors along with the number of films directed by each director.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1950, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is total number of show times per dat for each cinema?", "output": "SELECT T2.name , sum(T1.show_times_per_day) FROM schedule AS T1 JOIN cinema AS T2 ON T1.cinema_id = T2.cinema_id GROUP BY T1.cinema_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is total number of show times per dat for each cinema?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1951, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the title and maximum price of each film?", "output": "SELECT T2.title , max(T1.price) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the title and maximum price of each film?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1952, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the title and highest price for each film.", "output": "SELECT T2.title , max(T1.price) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the title and highest price for each film.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1953, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show cinema name, film title, date, and price for each record in schedule.", "output": "SELECT T3.name , T2.title , T1.date , T1.price FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id JOIN cinema AS T3 ON T1.cinema_id = T3.cinema_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show cinema name, film title, date, and price for each record in schedule.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1954, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the title and director of the films without any schedule?", "output": "SELECT title , directed_by FROM film WHERE film_id NOT IN (SELECT film_id FROM schedule)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the title and director of the films without any schedule?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1955, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show director with the largest number of show times in total.", "output": "SELECT T2.directed_by FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.directed_by ORDER BY sum(T1.show_times_per_day) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show director with the largest number of show times in total.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1956, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the locations that have more than one movie theater with capacity above 300.", "output": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the locations that have more than one movie theater with capacity above 300.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1957, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In which locations are there more than one movie theater with capacity above 300?", "output": "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: In which locations are there more than one movie theater with capacity above 300?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1958, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many films have the word 'Dummy' in their titles?", "output": "SELECT count(*) FROM film WHERE title LIKE \"%Dummy%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many films have the word 'Dummy' in their titles?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cinema", "id": 1959, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of films whose title contains the word 'Dummy'.", "output": "SELECT count(*) FROM film WHERE title LIKE \"%Dummy%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of films whose title contains the word 'Dummy'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1960, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Are the customers holding coupons with amount 500 bad or good?", "output": "SELECT T1.good_or_bad_customer FROM customers AS T1 JOIN discount_coupons AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.coupon_amount = 500", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Are the customers holding coupons with amount 500 bad or good?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1961, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many bookings did each customer make? List the customer id, first name, and the count.", "output": "SELECT T1.customer_id , T1.first_name , count(*) FROM Customers AS T1 JOIN bookings AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many bookings did each customer make? List the customer id, first name, and the count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1962, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum total amount paid by a customer? List the customer id and amount.", "output": "SELECT customer_id , sum(amount_paid) FROM Payments GROUP BY customer_id ORDER BY sum(amount_paid) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the maximum total amount paid by a customer? List the customer id and amount.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1963, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the id and the amount of refund of the booking that incurred the most times of payments?", "output": "SELECT T1.booking_id , T1.amount_of_refund FROM Bookings AS T1 JOIN Payments AS T2 ON T1.booking_id = T2.booking_id GROUP BY T1.booking_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the id and the amount of refund of the booking that incurred the most times of payments?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1964, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the product that is booked for 3 times?", "output": "SELECT product_id FROM products_booked GROUP BY product_id HAVING count(*) = 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the product that is booked for 3 times?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1965, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the product description of the product booked with an amount of 102.76?", "output": "SELECT T2.product_description FROM products_booked AS T1 JOIN products_for_hire AS T2 ON T1.product_id = T2.product_id WHERE T1.booked_amount = 102.76", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the product description of the product booked with an amount of 102.76?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1966, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the start date and end date of the booking that has booked the product named 'Book collection A'?", "output": "SELECT T3.booking_start_date , T3.booking_end_date FROM Products_for_hire AS T1 JOIN products_booked AS T2 ON T1.product_id = T2.product_id JOIN bookings AS T3 ON T2.booking_id = T3.booking_id WHERE T1.product_name = 'Book collection A'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the start date and end date of the booking that has booked the product named 'Book collection A'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1967, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of products whose availability equals to 1?", "output": "SELECT T2.product_name FROM view_product_availability AS T1 JOIN products_for_hire AS T2 ON T1.product_id = T2.product_id WHERE T1.available_yn = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of products whose availability equals to 1?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1968, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different product types are there?", "output": "SELECT count(DISTINCT product_type_code) FROM products_for_hire", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different product types are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1969, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first name, last name, and gender of all the good customers? Order by their last name.", "output": "SELECT first_name , last_name , gender_mf FROM customers WHERE good_or_bad_customer = 'good' ORDER BY last_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first name, last name, and gender of all the good customers? Order by their last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1970, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average amount due for all the payments?", "output": "SELECT avg(amount_due) FROM payments", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average amount due for all the payments?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1971, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum, minimum, and average booked count for the products booked?", "output": "SELECT max(booked_count) , min(booked_count) , avg(booked_count) FROM products_booked", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum, minimum, and average booked count for the products booked?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1972, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the distinct payment types?", "output": "SELECT DISTINCT payment_type_code FROM payments", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the distinct payment types?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1973, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the daily hire costs for the products with substring 'Book' in its name?", "output": "SELECT daily_hire_cost FROM Products_for_hire WHERE product_name LIKE '%Book%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the daily hire costs for the products with substring 'Book' in its name?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1974, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many products are never booked with amount higher than 200?", "output": "SELECT count(*) FROM Products_for_hire WHERE product_id NOT IN ( SELECT product_id FROM products_booked WHERE booked_amount > 200 )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many products are never booked with amount higher than 200?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1975, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the coupon amount of the coupons owned by both good and bad customers?", "output": "SELECT T1.coupon_amount FROM Discount_Coupons AS T1 JOIN customers AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.good_or_bad_customer = 'good' INTERSECT SELECT T1.coupon_amount FROM Discount_Coupons AS T1 JOIN customers AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.good_or_bad_customer = 'bad'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the coupon amount of the coupons owned by both good and bad customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1976, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the payment date of the payment with amount paid higher than 300 or with payment type is 'Check'", "output": "SELECT payment_date FROM payments WHERE amount_paid > 300 OR payment_type_code = 'Check'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the payment date of the payment with amount paid higher than 300 or with payment type is 'Check',\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_for_hire", "id": 1977, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and descriptions of the products that are of 'Cutlery' type and have daily hire cost lower than 20?", "output": "SELECT product_name , product_description FROM products_for_hire WHERE product_type_code = 'Cutlery' AND daily_hire_cost < 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and descriptions of the products that are of 'Cutlery' type and have daily hire cost lower than 20?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_market", "id": 1978, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many phones are there?", "output": "SELECT count(*) FROM phone", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many phones are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_market", "id": 1979, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of phones in ascending order of price.", "output": "SELECT Name FROM phone ORDER BY Price ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of phones in ascending order of price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_market", "id": 1980, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the memories and carriers of phones?", "output": "SELECT Memory_in_G , Carrier FROM phone", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the memories and carriers of phones?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_market", "id": 1981, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the distinct carriers of phones with memories bigger than 32.", "output": "SELECT DISTINCT Carrier FROM phone WHERE Memory_in_G > 32", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the distinct carriers of phones with memories bigger than 32.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_market", "id": 1982, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of phones with carrier either \"Sprint\" or \"TMobile\".", "output": "SELECT Name FROM phone WHERE Carrier = \"Sprint\" OR Carrier = \"TMobile\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of phones with carrier either \"Sprint\" or \"TMobile\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_market", "id": 1983, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the carrier of the most expensive phone?", "output": "SELECT Carrier FROM phone ORDER BY Price DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the carrier of the most expensive phone?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_market", "id": 1984, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show different carriers of phones together with the number of phones with each carrier.", "output": "SELECT Carrier , COUNT(*) FROM phone GROUP BY Carrier", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show different carriers of phones together with the number of phones with each carrier.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_market", "id": 1985, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the most frequently used carrier of the phones.", "output": "SELECT Carrier FROM phone GROUP BY Carrier ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the most frequently used carrier of the phones.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_market", "id": 1986, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the carriers that have both phones with memory smaller than 32 and phones with memory bigger than 64.", "output": "SELECT Carrier FROM phone WHERE Memory_in_G < 32 INTERSECT SELECT Carrier FROM phone WHERE Memory_in_G > 64", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the carriers that have both phones with memory smaller than 32 and phones with memory bigger than 64.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_market", "id": 1987, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of phones and the districts of markets they are on.", "output": "SELECT T3.Name , T2.District FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of phones and the districts of markets they are on.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_market", "id": 1988, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of phones and the districts of markets they are on, in ascending order of the ranking of the market.", "output": "SELECT T3.Name , T2.District FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID ORDER BY T2.Ranking", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of phones and the districts of markets they are on, in ascending order of the ranking of the market.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_market", "id": 1989, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of phones that are on market with number of shops greater than 50.", "output": "SELECT T3.Name FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID WHERE T2.Num_of_shops > 50", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of phones that are on market with number of shops greater than 50.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_market", "id": 1990, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each phone, show its names and total number of stocks.", "output": "SELECT T2.Name , sum(T1.Num_of_stock) FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID = T2.Phone_ID GROUP BY T2.Name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each phone, show its names and total number of stocks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_market", "id": 1991, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of phones that have total number of stocks bigger than 2000, in descending order of the total number of stocks.", "output": "SELECT T2.Name FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID = T2.Phone_ID GROUP BY T2.Name HAVING sum(T1.Num_of_stock) >= 2000 ORDER BY sum(T1.Num_of_stock) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of phones that have total number of stocks bigger than 2000, in descending order of the total number of stocks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "phone_market", "id": 1992, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of phones that are not on any market.", "output": "SELECT Name FROM phone WHERE Phone_id NOT IN (SELECT Phone_ID FROM phone_market)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of phones that are not on any market.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 1993, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many gas companies are there?", "output": "SELECT count(*) FROM company", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many gas companies are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 1994, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of companies?", "output": "SELECT count(*) FROM company", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of companies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 1995, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the company name and rank for all companies in the decreasing order of their sales.", "output": "SELECT company , rank FROM company ORDER BY Sales_billion DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the company name and rank for all companies in the decreasing order of their sales.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 1996, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and rank of every company ordered by descending number of sales?", "output": "SELECT company , rank FROM company ORDER BY Sales_billion DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and rank of every company ordered by descending number of sales?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 1997, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the company name and the main industry for all companies whose headquarters are not from USA.", "output": "SELECT company , main_industry FROM company WHERE headquarters != 'USA'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the company name and the main industry for all companies whose headquarters are not from USA.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 1998, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the companies and main industries of all companies that are not headquartered in the United States?", "output": "SELECT company , main_industry FROM company WHERE headquarters != 'USA'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the companies and main industries of all companies that are not headquartered in the United States?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 1999, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all company names and headquarters in the descending order of market value.", "output": "SELECT company , headquarters FROM company ORDER BY market_value DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all company names and headquarters in the descending order of market value.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2000, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and headquarters of all companies ordered by descending market value?", "output": "SELECT company , headquarters FROM company ORDER BY market_value DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and headquarters of all companies ordered by descending market value?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2001, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show minimum, maximum, and average market value for all companies.", "output": "SELECT min(market_value) , max(market_value) , avg(market_value) FROM company", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show minimum, maximum, and average market value for all companies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2002, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the minimum, maximum, and average market value for every company?", "output": "SELECT min(market_value) , max(market_value) , avg(market_value) FROM company", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the minimum, maximum, and average market value for every company?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2003, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all main industry for all companies.", "output": "SELECT DISTINCT main_industry FROM company", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all main industry for all companies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2004, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different main industries for all companies?", "output": "SELECT DISTINCT main_industry FROM company", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different main industries for all companies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2005, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all headquarters and the number of companies in each headquarter.", "output": "SELECT headquarters , count(*) FROM company GROUP BY headquarters", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all headquarters and the number of companies in each headquarter.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2006, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each headquarter, what are the headquarter and how many companies are centered there?", "output": "SELECT headquarters , count(*) FROM company GROUP BY headquarters", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each headquarter, what are the headquarter and how many companies are centered there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2007, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all main industry and total market value in each industry.", "output": "SELECT main_industry , sum(market_value) FROM company GROUP BY main_industry", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all main industry and total market value in each industry.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2008, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the main indstries and total market value for each industry?", "output": "SELECT main_industry , sum(market_value) FROM company GROUP BY main_industry", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the main indstries and total market value for each industry?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2009, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the main industry with highest total market value and its number of companies.", "output": "SELECT main_industry , count(*) FROM company GROUP BY main_industry ORDER BY sum(market_value) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the main industry with highest total market value and its number of companies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2010, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each main industry, what is the total number of companies for the industry with the highest total market value?", "output": "SELECT main_industry , count(*) FROM company GROUP BY main_industry ORDER BY sum(market_value) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each main industry, what is the total number of companies for the industry with the highest total market value?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2011, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show headquarters with at least two companies in the banking industry.", "output": "SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show headquarters with at least two companies in the banking industry.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2012, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the headquarters with at least two companies in the banking industry?", "output": "SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the headquarters with at least two companies in the banking industry?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2013, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show gas station id, location, and manager_name for all gas stations ordered by open year.", "output": "SELECT station_id , LOCATION , manager_name FROM gas_station ORDER BY open_year", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show gas station id, location, and manager_name for all gas stations ordered by open year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2014, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the gas station ids, locations, and manager names for the gas stations ordered by opening year?", "output": "SELECT station_id , LOCATION , manager_name FROM gas_station ORDER BY open_year", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the gas station ids, locations, and manager names for the gas stations ordered by opening year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2015, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many gas station are opened between 2000 and 2005?", "output": "SELECT count(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many gas station are opened between 2000 and 2005?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2016, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of gas stations that opened between 2000 and 2005?", "output": "SELECT count(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of gas stations that opened between 2000 and 2005?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2017, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all locations and the number of gas stations in each location ordered by the count.", "output": "SELECT LOCATION , count(*) FROM gas_station GROUP BY LOCATION ORDER BY count(*)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all locations and the number of gas stations in each location ordered by the count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2018, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each location, how many gas stations are there in order?", "output": "SELECT LOCATION , count(*) FROM gas_station GROUP BY LOCATION ORDER BY count(*)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each location, how many gas stations are there in order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2019, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all headquarters with both a company in banking industry and a company in Oil and gas.", "output": "SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all headquarters with both a company in banking industry and a company in Oil and gas.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2020, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the headquarters that have both a company in the banking and 'oil and gas' industries?", "output": "SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the headquarters that have both a company in the banking and 'oil and gas' industries?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2021, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all headquarters without a company in banking industry.", "output": "SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all headquarters without a company in banking industry.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2022, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the headquarters without companies that are in the banking industry?", "output": "SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the headquarters without companies that are in the banking industry?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2023, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the company name with the number of gas station.", "output": "SELECT T2.company , count(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the company name with the number of gas station.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2024, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each company id, what are the companies and how many gas stations does each one operate?", "output": "SELECT T2.company , count(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each company id, what are the companies and how many gas stations does each one operate?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2025, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show company name and main industry without a gas station.", "output": "SELECT company , main_industry FROM company WHERE company_id NOT IN (SELECT company_id FROM station_company)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show company name and main industry without a gas station.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2026, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the main industries of the companies without gas stations and what are the companies?", "output": "SELECT company , main_industry FROM company WHERE company_id NOT IN (SELECT company_id FROM station_company)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the main industries of the companies without gas stations and what are the companies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2027, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the manager name for gas stations belonging to the ExxonMobil company.", "output": "SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the manager name for gas stations belonging to the ExxonMobil company.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2028, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the managers for gas stations that are operated by the ExxonMobil company?", "output": "SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the managers for gas stations that are operated by the ExxonMobil company?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2029, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all locations where a gas station for company with market value greater than 100 is located.", "output": "SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.market_value > 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all locations where a gas station for company with market value greater than 100 is located.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2030, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the locations that have gas stations owned by a company with a market value greater than 100?", "output": "SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.market_value > 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the locations that have gas stations owned by a company with a market value greater than 100?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2031, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the manager name with most number of gas stations opened after 2000.", "output": "SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the manager name with most number of gas stations opened after 2000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2032, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the manager with the most gas stations that opened after 2000?", "output": "SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the manager with the most gas stations that opened after 2000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2033, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "order all gas station locations by the opening year.", "output": "SELECT LOCATION FROM gas_station ORDER BY open_year", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: order all gas station locations by the opening year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2034, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the locations of all the gas stations ordered by opening year?", "output": "SELECT LOCATION FROM gas_station ORDER BY open_year", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the locations of all the gas stations ordered by opening year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2035, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the rank, company names, market values of the companies in the banking industry order by their sales and profits in billion.", "output": "SELECT rank , company , market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion , profits_billion", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: find the rank, company names, market values of the companies in the banking industry order by their sales and profits in billion.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2036, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the rank, company, and market value of every comapny in the banking industry ordered by sales and profits?", "output": "SELECT rank , company , market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion , profits_billion", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the rank, company, and market value of every comapny in the banking industry ordered by sales and profits?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2037, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the location and Representative name of the gas stations owned by the companies with top 3 Asset amounts.", "output": "SELECT T3.location , T3.Representative_Name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id ORDER BY T2.Assets_billion DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: find the location and Representative name of the gas stations owned by the companies with top 3 Asset amounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "gas_company", "id": 2038, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the locations and representatives' names of the gas stations owned by the companies with the 3 largest amounts of assets?", "output": "SELECT T3.location , T3.Representative_Name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id ORDER BY T2.Assets_billion DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the locations and representatives' names of the gas stations owned by the companies with the 3 largest amounts of assets?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2039, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many regions do we have?", "output": "SELECT count(*) FROM region", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many regions do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2040, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of regions.", "output": "SELECT count(*) FROM region", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of regions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2041, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all distinct region names ordered by their labels.", "output": "SELECT DISTINCT region_name FROM region ORDER BY Label", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all distinct region names ordered by their labels.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2042, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different region names, ordered by labels?", "output": "SELECT DISTINCT region_name FROM region ORDER BY Label", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different region names, ordered by labels?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2043, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many parties do we have?", "output": "SELECT count(DISTINCT party_name) FROM party", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many parties do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2044, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different parties.", "output": "SELECT count(DISTINCT party_name) FROM party", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of different parties.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2045, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ministers and the time they took and left office, listed by the time they left office.", "output": "SELECT minister , took_office , left_office FROM party ORDER BY left_office", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the ministers and the time they took and left office, listed by the time they left office.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2046, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office?", "output": "SELECT minister , took_office , left_office FROM party ORDER BY left_office", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2047, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the minister who took office after 1961 or before 1959.", "output": "SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the minister who took office after 1961 or before 1959.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2048, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the ministers who took office after 1961 or before 1959?", "output": "SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who are the ministers who took office after 1961 or before 1959?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2049, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all ministers who do not belong to Progress Party.", "output": "SELECT minister FROM party WHERE party_name != 'Progress Party'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all ministers who do not belong to Progress Party.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2050, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which ministers are not a part of the Progress Party?", "output": "SELECT minister FROM party WHERE party_name != 'Progress Party'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which ministers are not a part of the Progress Party?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2051, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all ministers and parties they belong to in descending order of the time they took office.", "output": "SELECT minister , party_name FROM party ORDER BY took_office DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all ministers and parties they belong to in descending order of the time they took office.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2052, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the ministers and what parties do they belong to, listed descending by the times they took office?", "output": "SELECT minister , party_name FROM party ORDER BY took_office DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who are the ministers and what parties do they belong to, listed descending by the times they took office?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2053, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the minister who left office at the latest time.", "output": "SELECT minister FROM party ORDER BY left_office DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the minister who left office at the latest time.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2054, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which minister left office the latest?", "output": "SELECT minister FROM party ORDER BY left_office DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which minister left office the latest?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2055, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List member names and their party names.", "output": "SELECT T1.member_name , T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List member names and their party names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2056, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of members and their corresponding parties?", "output": "SELECT T1.member_name , T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of members and their corresponding parties?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2057, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all party names and the number of members in each party.", "output": "SELECT T2.party_name , count(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all party names and the number of members in each party.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2058, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many members are in each party?", "output": "SELECT T2.party_name , count(*) FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many members are in each party?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2059, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of party with most number of members?", "output": "SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of party with most number of members?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2060, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name of the party with the most members.", "output": "SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the name of the party with the most members.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2061, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all party names and their region names.", "output": "SELECT T1.party_name , T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all party names and their region names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2062, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of parties and their respective regions?", "output": "SELECT T1.party_name , T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of parties and their respective regions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2063, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names of parties that does not have any members.", "output": "SELECT party_name FROM party WHERE party_id NOT IN (SELECT party_id FROM Member)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show names of parties that does not have any members.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2064, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of parties that have no members?", "output": "SELECT party_name FROM party WHERE party_id NOT IN (SELECT party_id FROM Member)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of parties that have no members?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2065, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the member names which are in both the party with id 3 and the party with id 1.", "output": "SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the member names which are in both the party with id 3 and the party with id 1.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2066, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which member names are shared among members in the party with the id 3 and the party with the id 1?", "output": "SELECT member_name FROM member WHERE party_id = 3 INTERSECT SELECT member_name FROM member WHERE party_id = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which member names are shared among members in the party with the id 3 and the party with the id 1?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2067, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show member names that are not in the Progress Party.", "output": "SELECT T1.member_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id WHERE T2.Party_name != \"Progress Party\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show member names that are not in the Progress Party.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2068, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which member names corresponding to members who are not in the Progress Party?", "output": "SELECT T1.member_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id WHERE T2.Party_name != \"Progress Party\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which member names corresponding to members who are not in the Progress Party?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2069, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many party events do we have?", "output": "SELECT count(*) FROM party_events", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many party events do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2070, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of party events.", "output": "SELECT count(*) FROM party_events", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of party events.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2071, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show party names and the number of events for each party.", "output": "SELECT T2.party_name , count(*) FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show party names and the number of events for each party.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2072, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many events are there for each party?", "output": "SELECT T2.party_name , count(*) FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many events are there for each party?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2073, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all member names who are not in charge of any event.", "output": "SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all member names who are not in charge of any event.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2074, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of members who are not in charge of any events?", "output": "SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of members who are not in charge of any events?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2075, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of parties with at least 2 events?", "output": "SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of parties with at least 2 events?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2076, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of parties that have two or more events.", "output": "SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names of parties that have two or more events.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2077, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of member in charge of greatest number of events?", "output": "SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id GROUP BY T2.member_in_charge_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of member in charge of greatest number of events?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2078, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name of the member who is in charge of the most events.", "output": "SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id = T2.member_in_charge_id GROUP BY T2.member_in_charge_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the name of the member who is in charge of the most events.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2079, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the event names that have more than 2 records.", "output": "SELECT event_name FROM party_events GROUP BY event_name HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: find the event names that have more than 2 records.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2080, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which event names were used more than twice for party events?", "output": "SELECT event_name FROM party_events GROUP BY event_name HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which event names were used more than twice for party events?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2081, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many Annual Meeting events happened in the United Kingdom region?", "output": "SELECT count(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id = t2.region_id JOIN party_events AS t3 ON t2.party_id = t3.party_id WHERE t1.region_name = \"United Kingdom\" AND t3.Event_Name = \"Annaual Meeting\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many Annual Meeting events happened in the United Kingdom region?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_people", "id": 2082, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of Annual Meeting events that took place in the region of the United Kingdom.", "output": "SELECT count(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id = t2.region_id JOIN party_events AS t3 ON t2.party_id = t3.party_id WHERE t1.region_name = \"United Kingdom\" AND t3.Event_Name = \"Annaual Meeting\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of Annual Meeting events that took place in the region of the United Kingdom.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "pilot_record", "id": 2083, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many pilots are there?", "output": "SELECT count(*) FROM pilot", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many pilots are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "pilot_record", "id": 2084, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of pilots in ascending order of rank.", "output": "SELECT Pilot_name FROM pilot ORDER BY Rank ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of pilots in ascending order of rank.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "pilot_record", "id": 2085, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the positions and teams of pilots?", "output": "SELECT POSITION , Team FROM pilot", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the positions and teams of pilots?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "pilot_record", "id": 2086, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the distinct positions of pilots older than 30.", "output": "SELECT DISTINCT POSITION FROM pilot WHERE Age > 30", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the distinct positions of pilots older than 30.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "pilot_record", "id": 2087, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of pilots from team \"Bradley\" or \"Fordham\".", "output": "SELECT Pilot_name FROM pilot WHERE Team = \"Bradley\" OR Team = \"Fordham\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of pilots from team \"Bradley\" or \"Fordham\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "pilot_record", "id": 2088, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the joined year of the pilot of the highest rank?", "output": "SELECT Join_Year FROM pilot ORDER BY Rank ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the joined year of the pilot of the highest rank?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "pilot_record", "id": 2089, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality.", "output": "SELECT Nationality , COUNT(*) FROM pilot GROUP BY Nationality", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "pilot_record", "id": 2090, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the most common nationality of pilots.", "output": "SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the most common nationality of pilots.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "pilot_record", "id": 2091, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000.", "output": "SELECT POSITION FROM pilot WHERE Join_Year\t < 2000 INTERSECT SELECT POSITION FROM pilot WHERE Join_Year\t > 2005", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "pilot_record", "id": 2092, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of pilots and models of aircrafts they have flied with.", "output": "SELECT T3.Pilot_name , T2.Model FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of pilots and models of aircrafts they have flied with.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "pilot_record", "id": 2093, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of pilots and fleet series of the aircrafts they have flied with in ascending order of the rank of the pilot.", "output": "SELECT T3.Pilot_name , T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID ORDER BY T3.Rank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of pilots and fleet series of the aircrafts they have flied with in ascending order of the rank of the pilot.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "pilot_record", "id": 2094, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the fleet series of the aircrafts flied by pilots younger than 34", "output": "SELECT T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID WHERE T3.Age < 34", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the fleet series of the aircrafts flied by pilots younger than 34,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "pilot_record", "id": 2095, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of pilots and the number of records they have.", "output": "SELECT T2.Pilot_name , COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of pilots and the number of records they have.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "pilot_record", "id": 2096, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names of pilots that have more than one record.", "output": "SELECT T2.Pilot_name , COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID = T2.pilot_ID GROUP BY T2.Pilot_name HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show names of pilots that have more than one record.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "pilot_record", "id": 2097, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of pilots that do not have any record.", "output": "SELECT Pilot_name FROM pilot WHERE Pilot_ID NOT IN (SELECT Pilot_ID FROM pilot_record)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of pilots that do not have any record.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2098, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What document status codes do we have?", "output": "SELECT document_status_code FROM Ref_Document_Status;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What document status codes do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2099, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description of document status code 'working'?", "output": "SELECT document_status_description FROM Ref_Document_Status WHERE document_status_code = \"working\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description of document status code 'working'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2100, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What document type codes do we have?", "output": "SELECT document_type_code FROM Ref_Document_Types;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What document type codes do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2101, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description of document type 'Paper'?", "output": "SELECT document_type_description FROM Ref_Document_Types WHERE document_type_code = \"Paper\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description of document type 'Paper'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2102, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the shipping agent names?", "output": "SELECT shipping_agent_name FROM Ref_Shipping_Agents;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the shipping agent names?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2103, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the shipping agent code of shipping agent UPS?", "output": "SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name = \"UPS\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the shipping agent code of shipping agent UPS?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2104, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all role codes?", "output": "SELECT role_code FROM ROLES;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all role codes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2105, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description of role code ED?", "output": "SELECT role_description FROM ROLES WHERE role_code = \"ED\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description of role code ED?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2106, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many employees do we have?", "output": "SELECT count(*) FROM Employees;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many employees do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2107, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the role of the employee named Koby?", "output": "SELECT T1.role_description FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code WHERE T2.employee_name = \"Koby\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the role of the employee named Koby?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2108, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all document ids and receipt dates of documents.", "output": "SELECT document_id , receipt_date FROM Documents;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all document ids and receipt dates of documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2109, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many employees does each role have? List role description, id and number of employees.", "output": "SELECT T1.role_description , T2.role_code , count(*) FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code GROUP BY T2.role_code;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many employees does each role have? List role description, id and number of employees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2110, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List roles that have more than one employee. List the role description and number of employees.", "output": "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;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List roles that have more than one employee. List the role description and number of employees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2111, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the document status description of the document with id 1?", "output": "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;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the document status description of the document with id 1?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2112, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many documents have the status code done?", "output": "SELECT count(*) FROM Documents WHERE document_status_code = \"done\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many documents have the status code done?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2113, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the document type code for the document with the id 2.", "output": "SELECT document_type_code FROM Documents WHERE document_id = 2;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the document type code for the document with the id 2.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2114, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the document ids for any documents with the status code done and the type code paper.", "output": "SELECT document_id FROM Documents WHERE document_status_code = \"done\" AND document_type_code = \"Paper\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the document ids for any documents with the status code done and the type code paper.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2115, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the shipping agent of the document with id 2?", "output": "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;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the shipping agent of the document with id 2?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2116, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many documents were shipped by USPS?", "output": "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\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many documents were shipped by USPS?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2117, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which shipping agent shipped the most documents? List the shipping agent name and the number of documents.", "output": "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;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which shipping agent shipped the most documents? List the shipping agent name and the number of documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2118, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the receipt date of the document with id 3?", "output": "SELECT receipt_date FROM Documents WHERE document_id = 3;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the receipt date of the document with id 3?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2119, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What address was the document with id 4 mailed to?", "output": "SELECT Addresses.address_details FROM Addresses JOIN Documents_Mailed ON Documents_Mailed.mailed_to_address_id = Addresses.address_id WHERE document_id = 4;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What address was the document with id 4 mailed to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2120, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the mail date of the document with id 7?", "output": "SELECT mailing_date FROM Documents_Mailed WHERE document_id = 7;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the mail date of the document with id 7?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2121, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the document ids of documents with the status done and type Paper, which not shipped by the shipping agent named USPS.", "output": "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\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the document ids of documents with the status done and type Paper, which not shipped by the shipping agent named USPS.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2122, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List document id of documents status is done and document type is Paper and the document is shipped by shipping agent named USPS.", "output": "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\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List document id of documents status is done and document type is Paper and the document is shipped by shipping agent named USPS.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2123, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is draft detail of the document with id 7?", "output": "SELECT draft_details FROM Document_Drafts WHERE document_id = 7;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is draft detail of the document with id 7?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2124, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many draft copies does the document with id 2 have?", "output": "SELECT count(*) FROM Draft_Copies WHERE document_id = 2;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many draft copies does the document with id 2 have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2125, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which document has the most draft copies? List its document id and number of draft copies.", "output": "SELECT document_id , count(copy_number) FROM Draft_Copies GROUP BY document_id ORDER BY count(copy_number) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which document has the most draft copies? List its document id and number of draft copies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2126, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which documents have more than 1 draft copies? List document id and number of draft copies.", "output": "SELECT document_id , count(*) FROM Draft_Copies GROUP BY document_id HAVING count(*) > 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which documents have more than 1 draft copies? List document id and number of draft copies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2127, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all employees in the circulation history of the document with id 1. List the employee's name.", "output": "SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id WHERE Circulation_History.document_id = 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all employees in the circulation history of the document with id 1. List the employee's name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2128, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the employees who have not showed up in any circulation history of documents. List the employee's name.", "output": "SELECT employee_name FROM Employees EXCEPT SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the employees who have not showed up in any circulation history of documents. List the employee's name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2129, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which employee has showed up in most circulation history documents. List the employee's name and the number of drafts and copies.", "output": "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;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which employee has showed up in most circulation history documents. List the employee's name and the number of drafts and copies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Control_Systems", "id": 2130, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT document_id , count(DISTINCT employee_id) FROM Circulation_History GROUP BY document_id;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_1", "id": 2131, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all department names ordered by their starting date.", "output": "SELECT dname FROM department ORDER BY mgr_start_date", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all department names ordered by their starting date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_1", "id": 2132, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find all dependent names who have a spouse relation with some employee.", "output": "SELECT Dependent_name FROM dependent WHERE relationship = 'Spouse'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: find all dependent names who have a spouse relation with some employee.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_1", "id": 2133, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "how many female dependents are there?", "output": "SELECT count(*) FROM dependent WHERE sex = 'F'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: how many female dependents are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_1", "id": 2134, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of departments that are located in Houston.", "output": "SELECT t1.dname FROM department AS t1 JOIN dept_locations AS t2 ON t1.dnumber = t2.dnumber WHERE t2.dlocation = 'Houston'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of departments that are located in Houston.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_1", "id": 2135, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the first names and last names of employees who earn more than 30000 in salary.", "output": "SELECT fname , lname FROM employee WHERE salary > 30000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the first names and last names of employees who earn more than 30000 in salary.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_1", "id": 2136, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of employees of each gender whose salary is lower than 50000.", "output": "SELECT count(*) , sex FROM employee WHERE salary < 50000 GROUP BY sex", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of employees of each gender whose salary is lower than 50000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_1", "id": 2137, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "list the first and last names, and the addresses of all employees in the ascending order of their birth date.", "output": "SELECT fname , lname , address FROM employee ORDER BY Bdate", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: list the first and last names, and the addresses of all employees in the ascending order of their birth date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_in_alabama", "id": 2138, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what are the event details of the services that have the type code 'Marriage'?", "output": "SELECT T1.event_details FROM EVENTS AS T1 JOIN Services AS T2 ON T1.Service_ID = T2.Service_ID WHERE T2.Service_Type_Code = 'Marriage'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what are the event details of the services that have the type code 'Marriage'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_in_alabama", "id": 2139, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and details of events that have more than one participants?", "output": "SELECT T1.event_id , T1.event_details FROM EVENTS AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY T1.Event_ID HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids and details of events that have more than one participants?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_in_alabama", "id": 2140, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many events have each participants attended? List the participant id, type and the number.", "output": "SELECT T1.Participant_ID , T1.Participant_Type_Code , count(*) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID GROUP BY T1.Participant_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many events have each participants attended? List the participant id, type and the number.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_in_alabama", "id": 2141, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the the participant ids, type code and details?", "output": "SELECT Participant_ID , Participant_Type_Code , Participant_Details FROM Participants", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the the participant ids, type code and details?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_in_alabama", "id": 2142, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many participants belong to the type 'Organizer'?", "output": "SELECT count(*) FROM participants WHERE participant_type_code = 'Organizer'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many participants belong to the type 'Organizer'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_in_alabama", "id": 2143, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the type of the services in alphabetical order.", "output": "SELECT service_type_code FROM services ORDER BY service_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the type of the services in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_in_alabama", "id": 2144, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the service id and details for the events.", "output": "SELECT service_id , event_details FROM EVENTS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the service id and details for the events.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_in_alabama", "id": 2145, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many events had participants whose details had the substring 'Dr.'", "output": "SELECT count(*) FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE T1.participant_details LIKE '%Dr.%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many events had participants whose details had the substring 'Dr.',\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_in_alabama", "id": 2146, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most common participant type?", "output": "SELECT participant_type_code FROM participants GROUP BY participant_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most common participant type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_in_alabama", "id": 2147, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which service id and type has the least number of participants?", "output": "SELECT T3.service_id , T4.Service_Type_Code FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID JOIN EVENTS AS T3 ON T2.Event_ID = T3.Event_ID JOIN services AS T4 ON T3.service_id = T4.service_id GROUP BY T3.service_id ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which service id and type has the least number of participants?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_in_alabama", "id": 2148, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the event with the most participants?", "output": "SELECT Event_ID FROM Participants_in_Events GROUP BY Event_ID ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the event with the most participants?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_in_alabama", "id": 2149, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which events id does not have any participant with detail 'Kenyatta Kuhn'?", "output": "SELECT event_id FROM EVENTS EXCEPT SELECT T1.event_id FROM Participants_in_Events AS T1 JOIN Participants AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE Participant_Details = 'Kenyatta Kuhn'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which events id does not have any participant with detail 'Kenyatta Kuhn'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_in_alabama", "id": 2150, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which services type had both successful and failure event details?", "output": "SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Success' INTERSECT SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Fail'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which services type had both successful and failure event details?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_in_alabama", "id": 2151, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many events did not have any participants?", "output": "SELECT count(*) FROM EVENTS WHERE event_id NOT IN (SELECT event_id FROM Participants_in_Events)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many events did not have any participants?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_in_alabama", "id": 2152, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the distinct participant ids who attended any events?", "output": "SELECT count(DISTINCT participant_id) FROM participants_in_Events", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the distinct participant ids who attended any events?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2153, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the race held most recently?", "output": "SELECT name FROM races ORDER BY date DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the race held most recently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2154, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the race that occurred most recently?", "output": "SELECT name FROM races ORDER BY date DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the race that occurred most recently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2155, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and date of the most recent race?", "output": "SELECT name , date FROM races ORDER BY date DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and date of the most recent race?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2156, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and date of the race that occurred most recently?", "output": "SELECT name , date FROM races ORDER BY date DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and date of the race that occurred most recently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2157, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all races held in 2017.", "output": "SELECT name FROM races WHERE YEAR = 2017", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all races held in 2017.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2158, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the races that occurred in the year 2017?", "output": "SELECT name FROM races WHERE YEAR = 2017", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the races that occurred in the year 2017?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2159, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct names of all races held between 2014 and 2017?", "output": "SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the distinct names of all races held between 2014 and 2017?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2160, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the unique names of all race held between 2014 and 2017?", "output": "SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the unique names of all race held between 2014 and 2017?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2161, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the forename and surname of all distinct drivers who once had laptime less than 93000 milliseconds?", "output": "SELECT DISTINCT T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the forename and surname of all distinct drivers who once had laptime less than 93000 milliseconds?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2162, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the forenames and surnames of all unique drivers who had a lap time of less than 93000 milliseconds?", "output": "SELECT DISTINCT T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the forenames and surnames of all unique drivers who had a lap time of less than 93000 milliseconds?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2163, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the distinct id and nationality of drivers who have had laptime more than 100000 milliseconds?", "output": "SELECT DISTINCT T1.driverid , T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the distinct id and nationality of drivers who have had laptime more than 100000 milliseconds?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2164, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different driver ids and nationalities of all drivers who had a laptime of more than 100000 milliseconds?", "output": "SELECT DISTINCT T1.driverid , T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different driver ids and nationalities of all drivers who had a laptime of more than 100000 milliseconds?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2165, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the forename and surname of the driver who has the smallest laptime?", "output": "SELECT T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the forename and surname of the driver who has the smallest laptime?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2166, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the forename and surname of the driver with the shortest laptime?", "output": "SELECT T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the forename and surname of the driver with the shortest laptime?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2167, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id and family name of the driver who has the longest laptime?", "output": "SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id and family name of the driver who has the longest laptime?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2168, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id and last name of the driver with the longest laptime?", "output": "SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id and last name of the driver with the longest laptime?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2169, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id, forname and surname of the driver who had the first position in terms of laptime at least twice?", "output": "SELECT T1.driverid , T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE POSITION = '1' GROUP BY T1.driverid HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id, forname and surname of the driver who had the first position in terms of laptime at least twice?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2170, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id, first name, and last name of the driver who was in the first position for laptime at least twice?", "output": "SELECT T1.driverid , T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE POSITION = '1' GROUP BY T1.driverid HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id, first name, and last name of the driver who was in the first position for laptime at least twice?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2171, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many drivers participated in the race Australian Grand Prix held in 2009?", "output": "SELECT count(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = \"Australian Grand Prix\" AND YEAR = 2009", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many drivers participated in the race Australian Grand Prix held in 2009?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2172, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many drivers were in the Australian Grand Prix held in 2009?", "output": "SELECT count(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = \"Australian Grand Prix\" AND YEAR = 2009", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many drivers were in the Australian Grand Prix held in 2009?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2173, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many drivers did not participate in the races held in 2009?", "output": "SELECT count(DISTINCT driverId) FROM results WHERE raceId NOT IN( SELECT raceId FROM races WHERE YEAR != 2009 )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many drivers did not participate in the races held in 2009?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2174, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many drivers did not race in 2009?", "output": "SELECT count(DISTINCT driverId) FROM results WHERE raceId NOT IN( SELECT raceId FROM races WHERE YEAR != 2009 )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many drivers did not race in 2009?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2175, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me a list of names and years of races that had any driver whose forename is Lewis?", "output": "SELECT T2.name , T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = \"Lewis\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me a list of names and years of races that had any driver whose forename is Lewis?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2176, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and years of all races that had a driver with the last name Lewis?", "output": "SELECT T2.name , T2.year FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T1.driverid = T3.driverid WHERE T3.forename = \"Lewis\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and years of all races that had a driver with the last name Lewis?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2177, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the forename and surname of drivers whose nationality is German?", "output": "SELECT forename , surname FROM drivers WHERE nationality = \"German\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the forename and surname of drivers whose nationality is German?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2178, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first and last name of all the German drivers?", "output": "SELECT forename , surname FROM drivers WHERE nationality = \"German\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first and last name of all the German drivers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2179, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT T2.driverid , T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = \"Australian Grand Prix\" INTERSECT SELECT T2.driverid , T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = \"Chinese Grand Prix\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2180, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id and first name of all the drivers who participated in the Australian Grand Prix and the Chinese Grand Prix?", "output": "SELECT T2.driverid , T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = \"Australian Grand Prix\" INTERSECT SELECT T2.driverid , T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = \"Chinese Grand Prix\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id and first name of all the drivers who participated in the Australian Grand Prix and the Chinese Grand Prix?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2181, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT T3.forename , T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = \"Australian Grand Prix\" EXCEPT SELECT T3.forename , T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = \"Chinese Grand Prix\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2182, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of all drivers who participated in the Australian Grand Prix but not the Chinese Grand Prix?", "output": "SELECT T3.forename , T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = \"Australian Grand Prix\" EXCEPT SELECT T3.forename , T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = \"Chinese Grand Prix\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last names of all drivers who participated in the Australian Grand Prix but not the Chinese Grand Prix?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2183, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the forenames of distinct drivers who was in position 1 as standing and won?", "output": "SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the forenames of distinct drivers who was in position 1 as standing and won?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2184, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the different first names of the drivers who are in position as standing and won?", "output": "SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the different first names of the drivers who are in position as standing and won?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2185, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the forenames of distinct drivers who won in position 1 as driver standing and had more than 20 points?", "output": "SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the forenames of distinct drivers who won in position 1 as driver standing and had more than 20 points?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2186, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of the different drivers who won in position 1 as driver standing and had more than 20 points?", "output": "SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of the different drivers who won in position 1 as driver standing and had more than 20 points?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2187, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the numbers of constructors for different nationalities?", "output": "SELECT count(*) , nationality FROM constructors GROUP BY nationality", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the numbers of constructors for different nationalities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2188, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each nationality, how many different constructors are there?", "output": "SELECT count(*) , nationality FROM constructors GROUP BY nationality", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each nationality, how many different constructors are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2189, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the numbers of races for each constructor id?", "output": "SELECT count(*) , constructorid FROM constructorStandings GROUP BY constructorid", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the numbers of races for each constructor id?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2190, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each constructor id, how many races are there?", "output": "SELECT count(*) , constructorid FROM constructorStandings GROUP BY constructorid", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each constructor id, how many races are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2191, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of races that were held after 2017 and the circuits were in the country of Spain?", "output": "SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = \"Spain\" AND T1.year > 2017", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of races that were held after 2017 and the circuits were in the country of Spain?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2192, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the races held after 2017 in Spain?", "output": "SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = \"Spain\" AND T1.year > 2017", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the races held after 2017 in Spain?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2193, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the unique names of races that held after 2000 and the circuits were in Spain?", "output": "SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = \"Spain\" AND T1.year > 2000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the unique names of races that held after 2000 and the circuits were in Spain?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2194, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all races held after 2000 in Spain?", "output": "SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = \"Spain\" AND T1.year > 2000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all races held after 2000 in Spain?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2195, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT DISTINCT driverid , STOP FROM pitstops WHERE duration < (SELECT max(duration) FROM pitstops WHERE raceid = 841)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2196, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT DISTINCT driverid , STOP FROM pitstops WHERE duration < (SELECT max(duration) FROM pitstops WHERE raceid = 841)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2197, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct driver id of all drivers that have a longer stop duration than some drivers in the race whose id is 841?", "output": "SELECT DISTINCT driverid , STOP FROM pitstops WHERE duration > (SELECT min(duration) FROM pitstops WHERE raceid = 841)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the distinct driver id of all drivers that have a longer stop duration than some drivers in the race whose id is 841?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2198, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT DISTINCT driverid , STOP FROM pitstops WHERE duration > (SELECT min(duration) FROM pitstops WHERE raceid = 841)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2199, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the forenames of all distinct drivers in alphabetical order?", "output": "SELECT DISTINCT forename FROM drivers ORDER BY forename ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the forenames of all distinct drivers in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2200, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all the different drivers in alphabetical order?", "output": "SELECT DISTINCT forename FROM drivers ORDER BY forename ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of all the different drivers in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2201, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all distinct races in reversed lexicographic order?", "output": "SELECT DISTINCT name FROM races ORDER BY name DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of all distinct races in reversed lexicographic order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2202, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different names of all the races in reverse alphabetical order?", "output": "SELECT DISTINCT name FROM races ORDER BY name DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different names of all the races in reverse alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2203, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of races held between 2009 and 2011?", "output": "SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of races held between 2009 and 2011?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2204, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all races held between 2009 and 2011?", "output": "SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all races held between 2009 and 2011?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2205, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of races held after 12:00:00 or before 09:00:00?", "output": "SELECT name FROM races WHERE TIME > \"12:00:00\" OR TIME < \"09:00:00\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of races held after 12:00:00 or before 09:00:00?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2206, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all races that occurred after 12:00:00 or before 09:00:00?", "output": "SELECT name FROM races WHERE TIME > \"12:00:00\" OR TIME < \"09:00:00\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all races that occurred after 12:00:00 or before 09:00:00?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2207, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results?", "output": "SELECT T1.forename , T1.surname , T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) > 8 UNION SELECT T1.forename , T1.surname , T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) > 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2208, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT T1.forename , T1.surname , T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) > 8 UNION SELECT T1.forename , T1.surname , T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) > 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2209, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results?", "output": "SELECT T1.surname , T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) = 11 INTERSECT SELECT T1.surname , T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) > 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2210, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races?", "output": "SELECT T1.surname , T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) = 11 INTERSECT SELECT T1.surname , T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid GROUP BY T1.driverid HAVING count(*) > 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2211, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id and last name of the driver who participated in the most races after 2010?", "output": "SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid WHERE T3.year > 2010 GROUP BY T1.driverid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id and last name of the driver who participated in the most races after 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2212, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id and last name of the driver who participated in the most races after 2010?", "output": "SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid WHERE T3.year > 2010 GROUP BY T1.driverid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id and last name of the driver who participated in the most races after 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2213, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of circuits that belong to UK or Malaysia?", "output": "SELECT name FROM circuits WHERE country = \"UK\" OR country = \"Malaysia\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of circuits that belong to UK or Malaysia?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2214, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the circuits that are in the UK or Malaysia?", "output": "SELECT name FROM circuits WHERE country = \"UK\" OR country = \"Malaysia\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the circuits that are in the UK or Malaysia?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2215, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id and location of circuits that belong to France or Belgium?", "output": "SELECT circuitid , LOCATION FROM circuits WHERE country = \"France\" OR country = \"Belgium\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id and location of circuits that belong to France or Belgium?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2216, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and locations of all circuits in France or Belgium?", "output": "SELECT circuitid , LOCATION FROM circuits WHERE country = \"France\" OR country = \"Belgium\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids and locations of all circuits in France or Belgium?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2217, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of Japanese constructors that have once earned more than 5 points?", "output": "SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = \"Japanese\" AND T2.points > 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of Japanese constructors that have once earned more than 5 points?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2218, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the Japanese constructors that have earned more than 5 points?", "output": "SELECT T1.name FROM constructors AS T1 JOIN constructorstandings AS T2 ON T1.constructorid = T2.constructorid WHERE T1.nationality = \"Japanese\" AND T2.points > 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the Japanese constructors that have earned more than 5 points?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2219, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?", "output": "SELECT avg(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = \"Monaco Grand Prix\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2220, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average fastest lap speed for the Monaco Grand Prix in 2008?", "output": "SELECT avg(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = \"Monaco Grand Prix\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average fastest lap speed for the Monaco Grand Prix in 2008?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2221, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?", "output": "SELECT max(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = \"Monaco Grand Prix\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2222, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum fastest lap speed in the Monaco Grand Prix in 2008?", "output": "SELECT max(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = \"Monaco Grand Prix\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the maximum fastest lap speed in the Monaco Grand Prix in 2008?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2223, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year?", "output": "SELECT max(T2.fastestlapspeed) , T1.name , T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2224, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each race name, What is the maximum fastest lap speed for races after 2004 ordered by year?", "output": "SELECT max(T2.fastestlapspeed) , T1.name , T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each race name, What is the maximum fastest lap speed for races after 2004 ordered by year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2225, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year?", "output": "SELECT avg(T2.fastestlapspeed) , T1.name , T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2226, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average fastest lap speed for races held after 2004, for each race, ordered by year?", "output": "SELECT avg(T2.fastestlapspeed) , T1.name , T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average fastest lap speed for races held after 2004, for each race, ordered by year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2227, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id, forename and number of races of all drivers who have at least participated in two races?", "output": "SELECT T1.driverid , T1.forename , count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id, forename and number of races of all drivers who have at least participated in two races?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2228, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id, forename, and number of races for all drivers that have participated in at least 2 races?", "output": "SELECT T1.driverid , T1.forename , count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id, forename, and number of races for all drivers that have participated in at least 2 races?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2229, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the driver id and number of races of all drivers who have at most participated in 30 races?", "output": "SELECT T1.driverid , count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*) <= 30", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the driver id and number of races of all drivers who have at most participated in 30 races?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2230, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each id of a driver who participated in at most 30 races, how many races did they participate in?", "output": "SELECT T1.driverid , count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*) <= 30", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each id of a driver who participated in at most 30 races, how many races did they participate in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2231, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id and surname of the driver who participated the most number of races?", "output": "SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id and surname of the driver who participated the most number of races?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "formula_1", "id": 2232, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and last names of all drivers who participated in the most races?", "output": "SELECT T1.driverid , T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids and last names of all drivers who participated in the most races?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2233, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many technicians are there?", "output": "SELECT count(*) FROM technician", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many technicians are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2234, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of technicians?", "output": "SELECT count(*) FROM technician", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of technicians?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2235, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of technicians in ascending order of age.", "output": "SELECT Name FROM technician ORDER BY Age ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of technicians in ascending order of age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2236, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the technicians by ascending order of age?", "output": "SELECT Name FROM technician ORDER BY Age ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the technicians by ascending order of age?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2237, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the team and starting year of technicians?", "output": "SELECT Team , Starting_Year FROM technician", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the team and starting year of technicians?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2238, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the team and starting year for each technician?", "output": "SELECT Team , Starting_Year FROM technician", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the team and starting year for each technician?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2239, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of technicians whose team is not \"NYY\".", "output": "SELECT Name FROM technician WHERE Team != \"NYY\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of technicians whose team is not \"NYY\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2240, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the technician whose team is not 'NYY'?", "output": "SELECT Name FROM technician WHERE Team != \"NYY\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the technician whose team is not 'NYY'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2241, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of technicians aged either 36 or 37", "output": "SELECT Name FROM technician WHERE Age = 36 OR Age = 37", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name of technicians aged either 36 or 37,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2242, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the technicians aged either 36 or 37?", "output": "SELECT Name FROM technician WHERE Age = 36 OR Age = 37", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the technicians aged either 36 or 37?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2243, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the starting year of the oldest technicians?", "output": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the starting year of the oldest technicians?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2244, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the starting year for the oldest technician?", "output": "SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the starting year for the oldest technician?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2245, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show different teams of technicians and the number of technicians in each team.", "output": "SELECT Team , COUNT(*) FROM technician GROUP BY Team", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show different teams of technicians and the number of technicians in each team.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2246, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each team, how many technicians are there?", "output": "SELECT Team , COUNT(*) FROM technician GROUP BY Team", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each team, how many technicians are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2247, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the team that has the most number of technicians.", "output": "SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the team that has the most number of technicians.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2248, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the teams with the most technicians?", "output": "SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the teams with the most technicians?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2249, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the team that have at least two technicians.", "output": "SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the team that have at least two technicians.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2250, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the team with at least 2 technicians?", "output": "SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the team with at least 2 technicians?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2251, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names of technicians and series of machines they are assigned to repair.", "output": "SELECT T3.Name , T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show names of technicians and series of machines they are assigned to repair.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2252, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of technicians and the machine series that they repair?", "output": "SELECT T3.Name , T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of technicians and the machine series that they repair?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2253, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names of technicians in ascending order of quality rank of the machine they are assigned.", "output": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show names of technicians in ascending order of quality rank of the machine they are assigned.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2254, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the technicians by ascending order of quality rank for the machine they are assigned?", "output": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the technicians by ascending order of quality rank for the machine they are assigned?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2255, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names of technicians who are assigned to repair machines with value point more than 70.", "output": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show names of technicians who are assigned to repair machines with value point more than 70.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2256, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the technicians that are assigned to repair machines with more point values than 70?", "output": "SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the technicians that are assigned to repair machines with more point values than 70?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2257, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names of technicians and the number of machines they are assigned to repair.", "output": "SELECT T2.Name , COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show names of technicians and the number of machines they are assigned to repair.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2258, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the technicians and how many machines are they assigned to repair?", "output": "SELECT T2.Name , COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the technicians and how many machines are they assigned to repair?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2259, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of technicians who have not been assigned to repair machines.", "output": "SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of technicians who have not been assigned to repair machines.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2260, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the technicians that have not been assigned to repair machines?", "output": "SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the technicians that have not been assigned to repair machines?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2261, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the starting years shared by technicians from team \"CLE\" and \"CWS\".", "output": "SELECT Starting_Year FROM technician WHERE Team = \"CLE\" INTERSECT SELECT Starting_Year FROM technician WHERE Team = \"CWS\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the starting years shared by technicians from team \"CLE\" and \"CWS\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "machine_repair", "id": 2262, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the starting years shared by the technicians from the team \"CLE\" or \"CWS\"?", "output": "SELECT Starting_Year FROM technician WHERE Team = \"CLE\" INTERSECT SELECT Starting_Year FROM technician WHERE Team = \"CWS\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the starting years shared by the technicians from the team \"CLE\" or \"CWS\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2263, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many entrepreneurs are there?", "output": "SELECT count(*) FROM entrepreneur", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: How many entrepreneurs are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2264, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of entrepreneurs.", "output": "SELECT count(*) FROM entrepreneur", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: Count the number of entrepreneurs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2265, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the companies of entrepreneurs in descending order of money requested.", "output": "SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: List the companies of entrepreneurs in descending order of money requested.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2266, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the companies of entrepreneurs, ordered descending by amount of money requested?", "output": "SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: What are the companies of entrepreneurs, ordered descending by amount of money requested?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2267, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the companies and the investors of entrepreneurs.", "output": "SELECT Company , Investor FROM entrepreneur", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: List the companies and the investors of entrepreneurs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2268, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the companies and investors that correspond to each entrepreneur?", "output": "SELECT Company , Investor FROM entrepreneur", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: What are the companies and investors that correspond to each entrepreneur?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2269, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average money requested by all entrepreneurs?", "output": "SELECT avg(Money_Requested) FROM entrepreneur", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: What is the average money requested by all entrepreneurs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2270, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the average money requested across all entrepreneurs.", "output": "SELECT avg(Money_Requested) FROM entrepreneur", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: Return the average money requested across all entrepreneurs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2271, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of people in ascending order of weight?", "output": "SELECT Name FROM People ORDER BY Weight ASC", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: What are the names of people in ascending order of weight?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2272, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of people, ordered by weight ascending.", "output": "SELECT Name FROM People ORDER BY Weight ASC", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: Return the names of people, ordered by weight ascending.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2273, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of entrepreneurs?", "output": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: What are the names of entrepreneurs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2274, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of entrepreneurs.", "output": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: Return the names of entrepreneurs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2275, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of entrepreneurs whose investor is not \"Rachel Elnaugh\"?", "output": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor != \"Rachel Elnaugh\"", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: What are the names of entrepreneurs whose investor is not \"Rachel Elnaugh\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2276, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of entrepreneurs do no not have the investor Rachel Elnaugh.", "output": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor != \"Rachel Elnaugh\"", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: Return the names of entrepreneurs do no not have the investor Rachel Elnaugh.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2277, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the weight of the shortest person?", "output": "SELECT Weight FROM people ORDER BY Height ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: What is the weight of the shortest person?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2278, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the weight of the shortest person.", "output": "SELECT Weight FROM people ORDER BY Height ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: Return the weight of the shortest person.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2279, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the entrepreneur with the greatest weight?", "output": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: What is the name of the entrepreneur with the greatest weight?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2280, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name of the heaviest entrepreneur.", "output": "SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: Return the name of the heaviest entrepreneur.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2281, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total money requested by entrepreneurs with height more than 1.85?", "output": "SELECT sum(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 1.85", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: What is the total money requested by entrepreneurs with height more than 1.85?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2282, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the total money requested by entrepreneurs who are taller than 1.85.", "output": "SELECT sum(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 1.85", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: Give the total money requested by entrepreneurs who are taller than 1.85.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2283, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the dates of birth of entrepreneurs with investor \"Simon Woodroffe\" or \"Peter Jones\"?", "output": "SELECT T2.Date_of_Birth FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = \"Simon Woodroffe\" OR T1.Investor = \"Peter Jones\"", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: What are the dates of birth of entrepreneurs with investor \"Simon Woodroffe\" or \"Peter Jones\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2284, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the dates of birth for entrepreneurs who have either the investor Simon Woodroffe or Peter Jones.", "output": "SELECT T2.Date_of_Birth FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = \"Simon Woodroffe\" OR T1.Investor = \"Peter Jones\"", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: Return the dates of birth for entrepreneurs who have either the investor Simon Woodroffe or Peter Jones.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2285, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the weights of entrepreneurs in descending order of money requested?", "output": "SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: What are the weights of entrepreneurs in descending order of money requested?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2286, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the weights of entrepreneurs, ordered descending by amount of money requested.", "output": "SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested DESC", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: Return the weights of entrepreneurs, ordered descending by amount of money requested.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2287, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor?", "output": "SELECT Investor , COUNT(*) FROM entrepreneur GROUP BY Investor", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2288, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many entrepreneurs correspond to each investor?", "output": "SELECT Investor , COUNT(*) FROM entrepreneur GROUP BY Investor", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: How many entrepreneurs correspond to each investor?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2289, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the investor that has invested in the most number of entrepreneurs?", "output": "SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: What is the investor that has invested in the most number of entrepreneurs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2290, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the investor who have invested in the greatest number of entrepreneurs.", "output": "SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: Return the investor who have invested in the greatest number of entrepreneurs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2291, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the investors that have invested in at least two entrepreneurs?", "output": "SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: What are the investors that have invested in at least two entrepreneurs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2292, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the investors who have invested in two or more entrepreneurs.", "output": "SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: Return the investors who have invested in two or more entrepreneurs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2293, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of entrepreneurs and their companies in descending order of money requested?", "output": "SELECT T2.Name , T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: List the names of entrepreneurs and their companies in descending order of money requested?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2294, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of entrepreneurs and their corresponding investors, ordered descending by the amount of money requested?", "output": "SELECT T2.Name , T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: What are the names of entrepreneurs and their corresponding investors, ordered descending by the amount of money requested?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2295, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of people that are not entrepreneurs.", "output": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM entrepreneur)", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: List the names of people that are not entrepreneurs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2296, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of people who are not entrepreneurs?", "output": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM entrepreneur)", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: What are the names of people who are not entrepreneurs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2297, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000.", "output": "SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2298, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the investors who have invested in both entrepreneurs who requested more than 140000 and entrepreneurs who requested less than 120000?", "output": "SELECT Investor FROM entrepreneur WHERE Money_Requested > 140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested < 120000", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: What are the investors who have invested in both entrepreneurs who requested more than 140000 and entrepreneurs who requested less than 120000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2299, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct companies are there?", "output": "SELECT count(DISTINCT Company) FROM entrepreneur", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: How many distinct companies are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2300, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different companies.", "output": "SELECT count(DISTINCT Company) FROM entrepreneur", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: Count the number of different companies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2301, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the company of the tallest entrepreneur.", "output": "SELECT T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Height DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: Show the company of the tallest entrepreneur.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entrepreneur", "id": 2302, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which company was started by the entrepreneur with the greatest height?", "output": "SELECT T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Height DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'entrepreneur': ['Entrepreneur_ID', 'People_ID', 'Company', 'Money_Requested', 'Investor'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Date_of_Birth']} and \n# the user question: Which company was started by the entrepreneur with the greatest height?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2303, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many perpetrators are there?", "output": "SELECT count(*) FROM perpetrator", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: How many perpetrators are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2304, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the date of perpetrators in descending order of the number of people killed.", "output": "SELECT Date FROM perpetrator ORDER BY Killed DESC", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: List the date of perpetrators in descending order of the number of people killed.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2305, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the number of people injured by perpetrators in ascending order.", "output": "SELECT Injured FROM perpetrator ORDER BY Injured ASC", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: List the number of people injured by perpetrators in ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2306, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of people injured by all perpetrators?", "output": "SELECT avg(Injured) FROM perpetrator", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: What is the average number of people injured by all perpetrators?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2307, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the location of the perpetrator with the largest kills.", "output": "SELECT LOCATION FROM perpetrator ORDER BY Killed DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: What is the location of the perpetrator with the largest kills.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2308, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of people in ascending order of height?", "output": "SELECT Name FROM People ORDER BY Height ASC", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: What are the names of people in ascending order of height?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2309, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of perpetrators?", "output": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: What are the names of perpetrators?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2310, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of perpetrators whose country is not \"China\"?", "output": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Country != \"China\"", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: What are the names of perpetrators whose country is not \"China\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2311, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the perpetrator with the biggest weight.", "output": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Weight DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: What is the name of the perpetrator with the biggest weight.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2312, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total kills of the perpetrators with height more than 1.84.", "output": "SELECT sum(T2.Killed) FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 1.84", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: What is the total kills of the perpetrators with height more than 1.84.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2313, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of perpetrators in country \"China\" or \"Japan\"?", "output": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Country = \"China\" OR T2.Country = \"Japan\"", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: What are the names of perpetrators in country \"China\" or \"Japan\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2314, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the heights of perpetrators in descending order of the number of people they injured?", "output": "SELECT T1.Height FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Injured DESC", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: What are the heights of perpetrators in descending order of the number of people they injured?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2315, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the countries of perpetrators? Show each country and the corresponding number of perpetrators there.", "output": "SELECT Country , COUNT(*) FROM perpetrator GROUP BY Country", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: What are the countries of perpetrators? Show each country and the corresponding number of perpetrators there.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2316, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the country that has the most perpetrators?", "output": "SELECT Country , COUNT(*) FROM perpetrator GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: What is the country that has the most perpetrators?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2317, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the countries that have at least two perpetrators?", "output": "SELECT Country , COUNT(*) FROM perpetrator GROUP BY Country HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: What are the countries that have at least two perpetrators?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2318, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of perpetrators in descending order of the year.", "output": "SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Year DESC", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: List the names of perpetrators in descending order of the year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2319, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of people that are not perpetrators.", "output": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM perpetrator)", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: List the names of people that are not perpetrators.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2320, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the countries that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20.", "output": "SELECT Country FROM perpetrator WHERE Injured > 50 INTERSECT SELECT Country FROM perpetrator WHERE Injured < 20", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: Show the countries that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2321, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct locations of perpetrators are there?", "output": "SELECT count(DISTINCT LOCATION) FROM perpetrator", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: How many distinct locations of perpetrators are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2322, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the date of the tallest perpetrator.", "output": "SELECT T2.Date FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: Show the date of the tallest perpetrator.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "perpetrator", "id": 2323, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In which year did the most recent crime happen?", "output": "SELECT max(YEAR) FROM perpetrator;", "input": "Based on \n# the table&column(database schema) information {'perpetrator': ['Perpetrator_ID', 'People_ID', 'Date', 'Year', 'Location', 'Country', 'Killed', 'Injured'], 'people': ['People_ID', 'Name', 'Height', 'Weight', 'Home Town']} and \n# the user question: In which year did the most recent crime happen?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2324, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Report the name of all campuses in Los Angeles county.", "output": "SELECT campus FROM campuses WHERE county = \"Los Angeles\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Report the name of all campuses in Los Angeles county.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2325, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What campuses are located in the county of Los Angeles?", "output": "SELECT campus FROM campuses WHERE county = \"Los Angeles\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What campuses are located in the county of Los Angeles?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2326, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all campuses located at Chico?", "output": "SELECT campus FROM campuses WHERE LOCATION = \"Chico\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all campuses located at Chico?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2327, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What campuses are located in Chico?", "output": "SELECT campus FROM campuses WHERE LOCATION = \"Chico\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What campuses are located in Chico?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2328, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the campuses opened in 1958.", "output": "SELECT campus FROM campuses WHERE YEAR = 1958", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the campuses opened in 1958.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2329, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the campuses that opened in 1958?", "output": "SELECT campus FROM campuses WHERE YEAR = 1958", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the campuses that opened in 1958?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2330, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the campuses opened before 1800.", "output": "SELECT campus FROM campuses WHERE YEAR < 1800", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the campuses opened before 1800.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2331, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What campuses opened before 1800?", "output": "SELECT campus FROM campuses WHERE YEAR < 1800", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What campuses opened before 1800?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2332, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which campus was opened between 1935 and 1939?", "output": "SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which campus was opened between 1935 and 1939?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2333, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What campuses opened between 1935 and 1939?", "output": "SELECT campus FROM campuses WHERE YEAR >= 1935 AND YEAR <= 1939", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What campuses opened between 1935 and 1939?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2334, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the campuses that is in Northridge, Los Angeles or in San Francisco, San Francisco.", "output": "SELECT campus FROM campuses WHERE LOCATION = \"Northridge\" AND county = \"Los Angeles\" UNION SELECT campus FROM campuses WHERE LOCATION = \"San Francisco\" AND county = \"San Francisco\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the campuses that is in Northridge, Los Angeles or in San Francisco, San Francisco.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2335, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What campuses are located in Northridge, Los Angeles or in San Francisco, San Francisco?", "output": "SELECT campus FROM campuses WHERE LOCATION = \"Northridge\" AND county = \"Los Angeles\" UNION SELECT campus FROM campuses WHERE LOCATION = \"San Francisco\" AND county = \"San Francisco\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What campuses are located in Northridge, Los Angeles or in San Francisco, San Francisco?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2336, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the campus fee of \"San Jose State University\" in year 1996?", "output": "SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = \"San Jose State University\" AND T2.year = 1996", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the campus fee of \"San Jose State University\" in year 1996?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2337, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the campus fee for San Jose State University in 1996?", "output": "SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = \"San Jose State University\" AND T2.year = 1996", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the campus fee for San Jose State University in 1996?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2338, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the campus fee of \"San Francisco State University\" in year 1996?", "output": "SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = \"San Francisco State University\" AND T2.year = 1996", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the campus fee of \"San Francisco State University\" in year 1996?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2339, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the campus fee for San Francisco State University in 1996?", "output": "SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = \"San Francisco State University\" AND T2.year = 1996", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the campus fee for San Francisco State University in 1996?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2340, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the count of universities whose campus fee is greater than the average campus fee.", "output": "SELECT count(*) FROM csu_fees WHERE campusfee > (SELECT avg(campusfee) FROM csu_fees)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the count of universities whose campus fee is greater than the average campus fee.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2341, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many universities have a campus fee higher than average?", "output": "SELECT count(*) FROM csu_fees WHERE campusfee > (SELECT avg(campusfee) FROM csu_fees)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many universities have a campus fee higher than average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2342, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the count of universities whose campus fee is greater than the average campus fee.", "output": "SELECT count(*) FROM csu_fees WHERE campusfee > (SELECT avg(campusfee) FROM csu_fees)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the count of universities whose campus fee is greater than the average campus fee.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2343, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many universities have a campus fee greater than the average?", "output": "SELECT count(*) FROM csu_fees WHERE campusfee > (SELECT avg(campusfee) FROM csu_fees)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many universities have a campus fee greater than the average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2344, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which university is in Los Angeles county and opened after 1950?", "output": "SELECT campus FROM campuses WHERE county = \"Los Angeles\" AND YEAR > 1950", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which university is in Los Angeles county and opened after 1950?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2345, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What campuses are located in Los Angeles county and opened after 1950?", "output": "SELECT campus FROM campuses WHERE county = \"Los Angeles\" AND YEAR > 1950", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What campuses are located in Los Angeles county and opened after 1950?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2346, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which year has the most degrees conferred?", "output": "SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY sum(degrees) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which year has the most degrees conferred?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2347, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In what year was the most degrees conferred?", "output": "SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY sum(degrees) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: In what year was the most degrees conferred?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2348, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which campus has the most degrees conferred in all times?", "output": "SELECT campus FROM degrees GROUP BY campus ORDER BY sum(degrees) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which campus has the most degrees conferred in all times?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2349, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What campus has the most degrees conferrred over its entire existence?", "output": "SELECT campus FROM degrees GROUP BY campus ORDER BY sum(degrees) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What campus has the most degrees conferrred over its entire existence?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2350, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which campus has the most faculties in year 2003?", "output": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2003 ORDER BY T2.faculty DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which campus has the most faculties in year 2003?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2351, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What campus has the most faculties in 2003?", "output": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2003 ORDER BY T2.faculty DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What campus has the most faculties in 2003?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2352, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average fee on a CSU campus in 1996", "output": "SELECT avg(campusfee) FROM csu_fees WHERE YEAR = 1996", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average fee on a CSU campus in 1996,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2353, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average fee for a CSU campus in the year of 1996?", "output": "SELECT avg(campusfee) FROM csu_fees WHERE YEAR = 1996", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average fee for a CSU campus in the year of 1996?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2354, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average fee on a CSU campus in 2005?", "output": "SELECT avg(campusfee) FROM csu_fees WHERE YEAR = 2005", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average fee on a CSU campus in 2005?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2355, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average fee for a CSU campus in the year of 2005?", "output": "SELECT avg(campusfee) FROM csu_fees WHERE YEAR = 2005", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average fee for a CSU campus in the year of 2005?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2356, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "report the total number of degrees granted between 1998 and 2002.", "output": "SELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: report the total number of degrees granted between 1998 and 2002.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2357, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "how many degrees were conferred between 1998 and 2002?", "output": "SELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: how many degrees were conferred between 1998 and 2002?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2358, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each Orange county campus, report the number of degrees granted after 2000.", "output": "SELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T1.county = \"Orange\" AND T2.year >= 2000 GROUP BY T1.campus", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each Orange county campus, report the number of degrees granted after 2000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2359, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of degrees granted after 2000 for each Orange county campus?", "output": "SELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T1.county = \"Orange\" AND T2.year >= 2000 GROUP BY T1.campus", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of degrees granted after 2000 for each Orange county campus?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2360, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the campus which has more faculties in 2002 than every campus in Orange county.", "output": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT max(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = \"Orange\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the campus which has more faculties in 2002 than every campus in Orange county.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2361, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the campus that have more faculties in 2002 than the maximum number in Orange county?", "output": "SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND faculty > (SELECT max(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2002 AND T1.county = \"Orange\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the campus that have more faculties in 2002 than the maximum number in Orange county?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2362, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956?", "output": "SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400 AND FTE_AY > 200", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2363, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What campus started in year 1956, has more than 200 full time students, and more than 400 students enrolled?", "output": "SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id = t2.campus WHERE t2.year = 1956 AND totalenrollment_ay > 400 AND FTE_AY > 200", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What campus started in year 1956, has more than 200 full time students, and more than 400 students enrolled?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2364, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many campuses are there in Los Angeles county?", "output": "SELECT count(*) FROM campuses WHERE county = \"Los Angeles\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many campuses are there in Los Angeles county?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2365, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many campuses exist are in the county of LA?", "output": "SELECT count(*) FROM campuses WHERE county = \"Los Angeles\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many campuses exist are in the county of LA?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2366, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the campuses in Los Angeles county.", "output": "SELECT campus FROM campuses WHERE county = \"Los Angeles\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the campuses in Los Angeles county.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2367, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What campuses are in Los Angeles county?", "output": "SELECT campus FROM campuses WHERE county = \"Los Angeles\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What campuses are in Los Angeles county?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2368, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many degrees were conferred in \"San Jose State University\" in 2000?", "output": "SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = \"San Jose State University\" AND t2.year = 2000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many degrees were conferred in \"San Jose State University\" in 2000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2369, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many degrees were conferred at San Jose State University in 2000?", "output": "SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = \"San Jose State University\" AND t2.year = 2000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many degrees were conferred at San Jose State University in 2000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2370, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the degrees conferred in \"San Francisco State University\" in 2001.", "output": "SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = \"San Francisco State University\" AND t2.year = 2001", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the degrees conferred in \"San Francisco State University\" in 2001.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2371, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What degrees were conferred in San Francisco State University in the year 2001?", "output": "SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id = t2.campus WHERE t1.campus = \"San Francisco State University\" AND t2.year = 2001", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What degrees were conferred in San Francisco State University in the year 2001?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2372, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many faculty is there in total in the year of 2002?", "output": "SELECT sum(faculty) FROM faculty WHERE YEAR = 2002", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many faculty is there in total in the year of 2002?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2373, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many faculty, in total, are there in the year 2002?", "output": "SELECT sum(faculty) FROM faculty WHERE YEAR = 2002", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many faculty, in total, are there in the year 2002?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2374, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of faculty lines in campus \"Long Beach State University\" in 2002?", "output": "SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2002 AND T2.campus = \"Long Beach State University\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of faculty lines in campus \"Long Beach State University\" in 2002?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2375, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of faculty at Long Beach State University in 2002?", "output": "SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2002 AND T2.campus = \"Long Beach State University\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of faculty at Long Beach State University in 2002?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2376, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many faculty lines are there in \"San Francisco State University\" in year 2004?", "output": "SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2004 AND T2.campus = \"San Francisco State University\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many faculty lines are there in \"San Francisco State University\" in year 2004?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2377, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many faculty lines are there at San Francisco State University in 2004?", "output": "SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2004 AND T2.campus = \"San Francisco State University\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many faculty lines are there at San Francisco State University in 2004?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2378, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the campus that have between 600 and 1000 faculty lines in year 2004.", "output": "SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T1.year = 2004", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the campus that have between 600 and 1000 faculty lines in year 2004.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2379, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the campuses that had between 600 and 1000 faculty members in 2004?", "output": "SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id = t2.campus WHERE t2.faculty >= 600 AND t2.faculty <= 1000 AND T1.year = 2004", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the campuses that had between 600 and 1000 faculty members in 2004?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2380, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many faculty lines are there in the university that conferred the most number of degrees in year 2002?", "output": "SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2002 ORDER BY t3.degrees DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many faculty lines are there in the university that conferred the most number of degrees in year 2002?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2381, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many faculty members did the university that conferred the most degrees in 2002 have?", "output": "SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2002 ORDER BY t3.degrees DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many faculty members did the university that conferred the most degrees in 2002 have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2382, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many faculty lines are there in the university that conferred the least number of degrees in year 2001?", "output": "SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2001 ORDER BY t3.degrees LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many faculty lines are there in the university that conferred the least number of degrees in year 2001?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2383, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many faculty members are at the university that gave the least number of degrees in 2001?", "output": "SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = t2.campus JOIN degrees AS T3 ON T1.id = t3.campus AND t2.year = t3.year WHERE t2.year = 2001 ORDER BY t3.degrees LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many faculty members are at the university that gave the least number of degrees in 2001?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2384, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many undergraduates are there in \"San Jose State University\" in year 2004?", "output": "SELECT sum(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = \"San Jose State University\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many undergraduates are there in \"San Jose State University\" in year 2004?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2385, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many undergraduates are there at San Jose State", "output": "SELECT sum(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = \"San Jose State University\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many undergraduates are there at San Jose State,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2386, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of graduates in \"San Francisco State University\" in year 2004?", "output": "SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = \"San Francisco State University\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of graduates in \"San Francisco State University\" in year 2004?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2387, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many people graduated from San Francisco State University in 2004?", "output": "SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = \"San Francisco State University\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many people graduated from San Francisco State University in 2004?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2388, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the campus fee of \"San Francisco State University\" in year 2000?", "output": "SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = \"San Francisco State University\" AND t1.year = 2000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the campus fee of \"San Francisco State University\" in year 2000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2389, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In the year 2000, what is the campus fee for San Francisco State University?", "output": "SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = \"San Francisco State University\" AND t1.year = 2000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: In the year 2000, what is the campus fee for San Francisco State University?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2390, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the campus fee of \"San Jose State University\" in year 2000.", "output": "SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = \"San Jose State University\" AND t1.year = 2000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the campus fee of \"San Jose State University\" in year 2000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2391, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the campus fee in the year 2000 for San Jose State University?", "output": "SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t2.campus = \"San Jose State University\" AND t1.year = 2000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the campus fee in the year 2000 for San Jose State University?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2392, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many CSU campuses are there?", "output": "SELECT count(*) FROM campuses", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many CSU campuses are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "csu_1", "id": 2393, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of campuses?", "output": "SELECT count(*) FROM campuses", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of campuses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2394, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many candidates are there?", "output": "SELECT count(*) FROM candidate", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many candidates are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2395, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of candidates.", "output": "SELECT count(*) FROM candidate", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Count the number of candidates.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2396, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which poll resource provided the most number of candidate information?", "output": "SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Which poll resource provided the most number of candidate information?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2397, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the poll resource associated with the most candidates.", "output": "SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Return the poll resource associated with the most candidates.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2398, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what are the top 3 highest support rates?", "output": "SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: what are the top 3 highest support rates?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2399, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the top 3 greatest support rates.", "output": "SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Return the top 3 greatest support rates.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2400, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of the candidate who got the lowest oppose rate.", "output": "SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find the id of the candidate who got the lowest oppose rate.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2401, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the candidate with the lowest oppose rate?", "output": "SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What is the id of the candidate with the lowest oppose rate?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2402, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate.", "output": "SELECT Support_rate , Consider_rate , Oppose_rate FROM candidate ORDER BY unsure_rate", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2403, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the support, consider, and oppose rates of each candidate, ordered ascending by their unsure rate?", "output": "SELECT Support_rate , Consider_rate , Oppose_rate FROM candidate ORDER BY unsure_rate", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the support, consider, and oppose rates of each candidate, ordered ascending by their unsure rate?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2404, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "which poll source does the highest oppose rate come from?", "output": "SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: which poll source does the highest oppose rate come from?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2405, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the poll source corresponding to the candidate who has the oppose rate.", "output": "SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Return the poll source corresponding to the candidate who has the oppose rate.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2406, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all people names in the order of their date of birth from old to young.", "output": "SELECT name FROM people ORDER BY date_of_birth", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: List all people names in the order of their date of birth from old to young.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2407, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all people, ordered by their date of birth?", "output": "SELECT name FROM people ORDER BY date_of_birth", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the names of all people, ordered by their date of birth?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2408, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average height and weight for all males (sex is M).", "output": "SELECT avg(height) , avg(weight) FROM people WHERE sex = 'M'", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find the average height and weight for all males (sex is M).,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2409, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average height and weight across males (sex is M)?", "output": "SELECT avg(height) , avg(weight) FROM people WHERE sex = 'M'", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the average height and weight across males (sex is M)?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2410, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the names of people who are taller than 200 or lower than 190.", "output": "SELECT name FROM people WHERE height > 200 OR height < 190", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: find the names of people who are taller than 200 or lower than 190.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2411, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of people who have a height greater than 200 or less than 190?", "output": "SELECT name FROM people WHERE height > 200 OR height < 190", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the names of people who have a height greater than 200 or less than 190?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2412, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average and minimum weight for each gender.", "output": "SELECT avg(weight) , min(weight) , sex FROM people GROUP BY sex", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find the average and minimum weight for each gender.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2413, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average and minimum weights for people of each sex?", "output": "SELECT avg(weight) , min(weight) , sex FROM people GROUP BY sex", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the average and minimum weights for people of each sex?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2414, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and gender of the candidate who got the highest support rate.", "output": "SELECT t1.name , t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY t2.support_rate DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find the name and gender of the candidate who got the highest support rate.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2415, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and sex of the candidate with the highest support rate?", "output": "SELECT t1.name , t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id ORDER BY t2.support_rate DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What is the name and sex of the candidate with the highest support rate?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2416, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the candidates whose oppose percentage is the lowest for each sex.", "output": "SELECT t1.name , t1.sex , min(oppose_rate) FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find the name of the candidates whose oppose percentage is the lowest for each sex.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2417, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each sex, what is the name and sex of the candidate with the oppose rate for their sex?", "output": "SELECT t1.name , t1.sex , min(oppose_rate) FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: For each sex, what is the name and sex of the candidate with the oppose rate for their sex?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2418, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "which gender got the highest average uncertain ratio.", "output": "SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex ORDER BY avg(t2.unsure_rate) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: which gender got the highest average uncertain ratio.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2419, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the sex of the candidate who had the highest unsure rate?", "output": "SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex ORDER BY avg(t2.unsure_rate) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What is the sex of the candidate who had the highest unsure rate?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2420, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what are the names of people who did not participate in the candidate election.", "output": "SELECT name FROM people WHERE people_id NOT IN (SELECT people_id FROM candidate)", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: what are the names of people who did not participate in the candidate election.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2421, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the names of people who did not participate in the candidate election.", "output": "SELECT name FROM people WHERE people_id NOT IN (SELECT people_id FROM candidate)", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Give the names of people who did not participate in the candidate election.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2422, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the candidates whose support percentage is lower than their oppose rate.", "output": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t2.support_rate < t2.oppose_rate", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find the names of the candidates whose support percentage is lower than their oppose rate.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2423, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of candidates who have a lower support rate than oppose rate?", "output": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t2.support_rate < t2.oppose_rate", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the names of candidates who have a lower support rate than oppose rate?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2424, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "how many people are there whose weight is higher than 85 for each gender?", "output": "SELECT count(*) , sex FROM people WHERE weight > 85 GROUP BY sex", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: how many people are there whose weight is higher than 85 for each gender?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2425, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of people of each sex who have a weight higher than 85.", "output": "SELECT count(*) , sex FROM people WHERE weight > 85 GROUP BY sex", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Count the number of people of each sex who have a weight higher than 85.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2426, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the highest support percentage, lowest consider rate and oppose rate of all candidates.", "output": "SELECT max(support_rate) , min(consider_rate) , min(oppose_rate) FROM candidate", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: find the highest support percentage, lowest consider rate and oppose rate of all candidates.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2427, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the maximum support rate, minimum consider rate, and minimum oppose rate across all candidates?", "output": "SELECT max(support_rate) , min(consider_rate) , min(oppose_rate) FROM candidate", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Return the maximum support rate, minimum consider rate, and minimum oppose rate across all candidates?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2428, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "list all female (sex is F) candidate names in the alphabetical order.", "output": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t1.sex = 'F' ORDER BY t1.name", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: list all female (sex is F) candidate names in the alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2429, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all female candidates in alphabetical order (sex is F)?", "output": "SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id WHERE t1.sex = 'F' ORDER BY t1.name", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the names of all female candidates in alphabetical order (sex is F)?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2430, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the name of people whose height is lower than the average.", "output": "SELECT name FROM people WHERE height < (SELECT avg(height) FROM people)", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: find the name of people whose height is lower than the average.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2431, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of people who are shorter than average?", "output": "SELECT name FROM people WHERE height < (SELECT avg(height) FROM people)", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the names of people who are shorter than average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2432, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all info about all people.", "output": "SELECT * FROM people", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: List all info about all people.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "candidate_poll", "id": 2433, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is all the information about all people?", "output": "SELECT * FROM people", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What is all the information about all people?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2434, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the titles of all movies directed by steven spielberg.", "output": "SELECT title FROM Movie WHERE director = 'Steven Spielberg'", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Find the titles of all movies directed by steven spielberg.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2435, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all movies directed by Steven Spielberg?", "output": "SELECT title FROM Movie WHERE director = 'Steven Spielberg'", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of all movies directed by Steven Spielberg?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2436, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the movie produced after 2000 and directed by James Cameron?", "output": "SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the name of the movie produced after 2000 and directed by James Cameron?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2437, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of all movies that James Cameron directed after 2000?", "output": "SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the titles of all movies that James Cameron directed after 2000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2438, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many movies were made before 2000?", "output": "SELECT count(*) FROM Movie WHERE YEAR < 2000", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: How many movies were made before 2000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2439, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many movies were made before 2000?", "output": "SELECT count(*) FROM Movie WHERE YEAR < 2000", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: How many movies were made before 2000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2440, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the director of movie Avatar?", "output": "SELECT director FROM Movie WHERE title = 'Avatar'", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Who is the director of movie Avatar?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2441, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who directed Avatar?", "output": "SELECT director FROM Movie WHERE title = 'Avatar'", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Who directed Avatar?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2442, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many reviewers listed?", "output": "SELECT count(*) FROM Reviewer", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: How many reviewers listed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2443, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many reviewers are there?", "output": "SELECT count(*) FROM Reviewer", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: How many reviewers are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2444, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the reviewer whose name has substring \u201cMike\u201d?", "output": "SELECT rID FROM Reviewer WHERE name LIKE \"%Mike%\"", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the id of the reviewer whose name has substring \u201cMike\u201d?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2445, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the reviewer whose name includes the word \"Mike\"?", "output": "SELECT rID FROM Reviewer WHERE name LIKE \"%Mike%\"", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the id of the reviewer whose name includes the word \"Mike\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2446, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the reviewer id of Daniel Lewis?", "output": "SELECT rID FROM Reviewer WHERE name = \"Daniel Lewis\"", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the reviewer id of Daniel Lewis?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2447, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the reviewer named Daniel Lewis?", "output": "SELECT rID FROM Reviewer WHERE name = \"Daniel Lewis\"", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the id of the reviewer named Daniel Lewis?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2448, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of ratings that has more than 3 stars?", "output": "SELECT count(*) FROM Rating WHERE stars > 3", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the total number of ratings that has more than 3 stars?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2449, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many movie ratings have more than 3 stars?", "output": "SELECT count(*) FROM Rating WHERE stars > 3", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: How many movie ratings have more than 3 stars?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2450, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the lowest and highest rating star?", "output": "SELECT max(stars) , min(stars) FROM Rating", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the lowest and highest rating star?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2451, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum and mininum number of stars a rating can receive?", "output": "SELECT max(stars) , min(stars) FROM Rating", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the maximum and mininum number of stars a rating can receive?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2452, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year.", "output": "SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2453, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In what years did a movie receive a 4 or 5 star rating, and list the years from oldest to most recently?", "output": "SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: In what years did a movie receive a 4 or 5 star rating, and list the years from oldest to most recently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2454, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of directors who directed movies with 5 star rating? Also return the title of these movies.", "output": "SELECT T1.director , T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of directors who directed movies with 5 star rating? Also return the title of these movies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2455, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the directors who created a movie with a 5 star rating, and what was the name of those movies?", "output": "SELECT T1.director , T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = 5", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of the directors who created a movie with a 5 star rating, and what was the name of those movies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2456, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average rating star for each reviewer?", "output": "SELECT T2.name , avg(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the average rating star for each reviewer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2457, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of stars that each reviewer awards for a movie?", "output": "SELECT T2.name , avg(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the average number of stars that each reviewer awards for a movie?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2458, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the titles of all movies that have no ratings.", "output": "SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating)", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Find the titles of all movies that have no ratings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2459, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of all movies that have not been rated?", "output": "SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating)", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the titles of all movies that have not been rated?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2460, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all reviewers who have ratings with a NULL value for the date.", "output": "SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE ratingDate = \"null\"", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Find the names of all reviewers who have ratings with a NULL value for the date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2461, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different names of all reviewers whose ratings do not have a date field?", "output": "SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE ratingDate = \"null\"", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the different names of all reviewers whose ratings do not have a date field?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2462, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average rating stars and title for the oldest movie?", "output": "SELECT avg(T1.stars) , T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT min(YEAR) FROM Movie)", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the average rating stars and title for the oldest movie?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2463, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For the oldest movie listed, what is its average rating and title?", "output": "SELECT avg(T1.stars) , T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT min(YEAR) FROM Movie)", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: For the oldest movie listed, what is its average rating and title?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2464, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the most recent movie?", "output": "SELECT title FROM Movie WHERE YEAR = (SELECT max(YEAR) FROM Movie)", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the name of the most recent movie?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2465, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the title of the newest movie?", "output": "SELECT title FROM Movie WHERE YEAR = (SELECT max(YEAR) FROM Movie)", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the title of the newest movie?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2466, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum stars and year for the most recent movie?", "output": "SELECT max(T1.stars) , T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT max(YEAR) FROM Movie)", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the maximum stars and year for the most recent movie?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2467, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is highest rating for the most recent movie and when was it released?", "output": "SELECT max(T1.stars) , T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.year = (SELECT max(YEAR) FROM Movie)", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is highest rating for the most recent movie and when was it released?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2468, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the names of movies whose created year is after all movies directed by Steven Spielberg?", "output": "SELECT title FROM Movie WHERE YEAR > (SELECT max(YEAR) FROM Movie WHERE director = \"Steven Spielberg\")", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the names of movies whose created year is after all movies directed by Steven Spielberg?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2469, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all movies that were created after the most recent Steven Spielberg film?", "output": "SELECT title FROM Movie WHERE YEAR > (SELECT max(YEAR) FROM Movie WHERE director = \"Steven Spielberg\")", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of all movies that were created after the most recent Steven Spielberg film?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2470, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles and directors of the movies whose star is greater than the average stars of the movies directed by James Cameron?", "output": "SELECT T2.title , T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars > (SELECT avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.director = \"James Cameron\")", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the titles and directors of the movies whose star is greater than the average stars of the movies directed by James Cameron?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2471, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles and directors of all movies that have a rating higher than the average James Cameron film rating?", "output": "SELECT T2.title , T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars > (SELECT avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T2.director = \"James Cameron\")", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the titles and directors of all movies that have a rating higher than the average James Cameron film rating?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2472, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T3.name , T2.title , T1.stars , T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID ORDER BY T3.name , T2.title , T1.stars", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2473, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the reviewer name, film title, movie rating, and rating date for every movie ordered by reviewer name, movie title, then finally rating?", "output": "SELECT T3.name , T2.title , T1.stars , T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID ORDER BY T3.name , T2.title , T1.stars", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the reviewer name, film title, movie rating, and rating date for every movie ordered by reviewer name, movie title, then finally rating?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2474, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all reviewers who have contributed three or more ratings.", "output": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Find the names of all reviewers who have contributed three or more ratings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2475, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all reviewers that have rated 3 or more movies?", "output": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T1.rID HAVING COUNT(*) >= 3", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of all reviewers that have rated 3 or more movies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2476, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all reviewers who rated Gone with the Wind.", "output": "SELECT DISTINCT T3.name FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.title = 'Gone with the Wind'", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Find the names of all reviewers who rated Gone with the Wind.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2477, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the different reviewers who rates Gone with the Wind?", "output": "SELECT DISTINCT T3.name FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.title = 'Gone with the Wind'", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of all the different reviewers who rates Gone with the Wind?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2478, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all directors whose movies are rated by Sarah Martinez.", "output": "SELECT DISTINCT T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Sarah Martinez'", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Find the names of all directors whose movies are rated by Sarah Martinez.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2479, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all directors whose movies have been reviewed by Sarah Martinez?", "output": "SELECT DISTINCT T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Sarah Martinez'", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of all directors whose movies have been reviewed by Sarah Martinez?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2480, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT DISTINCT T3.name , T2.title , T1.stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.director = T3.name", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2481, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different reviewer names, movie titles, and stars for every rating where the reviewer had the same name as the director?", "output": "SELECT DISTINCT T3.name , T2.title , T1.stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.director = T3.name", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the different reviewer names, movie titles, and stars for every rating where the reviewer had the same name as the director?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2482, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return all reviewer names and movie names together in a single list.", "output": "SELECT name FROM Reviewer UNION SELECT title FROM Movie", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Return all reviewer names and movie names together in a single list.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2483, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the reviewers and movie names?", "output": "SELECT name FROM Reviewer UNION SELECT title FROM Movie", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of all the reviewers and movie names?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2484, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the titles of all movies not reviewed by Chris Jackson.", "output": "SELECT DISTINCT title FROM Movie EXCEPT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Chris Jackson'", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Find the titles of all movies not reviewed by Chris Jackson.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2485, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of all movies that were not reviewed by Chris Jackson?", "output": "SELECT DISTINCT title FROM Movie EXCEPT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Chris Jackson'", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the titles of all movies that were not reviewed by Chris Jackson?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2486, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T1.title , T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title != T2.title ORDER BY T1.director , T1.title", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2487, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For all directors who have directed more than one movie, what movies have they directed and what are their names?", "output": "SELECT T1.title , T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title != T2.title ORDER BY T1.director , T1.title", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: For all directors who have directed more than one movie, what movies have they directed and what are their names?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2488, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For directors who had more than one movie, return the titles and produced years of all movies directed by them.", "output": "SELECT T1.title , T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title != T2.title", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: For directors who had more than one movie, return the titles and produced years of all movies directed by them.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2489, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each director who directed more than one movie, what are the titles and dates of release for all those movies?", "output": "SELECT T1.title , T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title != T2.title", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: For each director who directed more than one movie, what are the titles and dates of release for all those movies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2490, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the directors who made exactly one movie?", "output": "SELECT director FROM Movie GROUP BY director HAVING count(*) = 1", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of the directors who made exactly one movie?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2491, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all directors who made one movie?", "output": "SELECT director FROM Movie GROUP BY director HAVING count(*) = 1", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of all directors who made one movie?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2492, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the directors who made exactly one movie excluding director NULL?", "output": "SELECT director FROM Movie WHERE director != \"null\" GROUP BY director HAVING count(*) = 1", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of the directors who made exactly one movie excluding director NULL?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2493, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all directors who have made one movie except for the director named NULL?", "output": "SELECT director FROM Movie WHERE director != \"null\" GROUP BY director HAVING count(*) = 1", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of all directors who have made one movie except for the director named NULL?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2494, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many movie reviews does each director get?", "output": "SELECT count(*) , T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: How many movie reviews does each director get?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2495, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each director, how many reviews have they received?", "output": "SELECT count(*) , T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: For each director, how many reviews have they received?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2496, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the movies with the highest average rating. Return the movie titles and average rating.", "output": "SELECT T2.title , avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY avg(T1.stars) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Find the movies with the highest average rating. Return the movie titles and average rating.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2497, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the movie titles with the highest average rating and what are those ratings?", "output": "SELECT T2.title , avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY avg(T1.stars) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the movie titles with the highest average rating and what are those ratings?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2498, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the movie titles and average rating of the movies with the lowest average rating?", "output": "SELECT T2.title , avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY avg(T1.stars) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the movie titles and average rating of the movies with the lowest average rating?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2499, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles and average ratings for all movies that have the lowest average rating?", "output": "SELECT T2.title , avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY avg(T1.stars) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the titles and average ratings for all movies that have the lowest average rating?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2500, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and years of the movies that has the top 3 highest rating star?", "output": "SELECT T2.title , T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names and years of the movies that has the top 3 highest rating star?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2501, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and years released for the movies with the top 3 highest ratings?", "output": "SELECT T2.title , T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names and years released for the movies with the top 3 highest ratings?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2502, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T2.title , T1.stars , T2.director , max(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE director != \"null\" GROUP BY director", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2503, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each director, what are the titles and ratings for all the movies they reviewed?", "output": "SELECT T2.title , T1.stars , T2.director , max(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE director != \"null\" GROUP BY director", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: For each director, what are the titles and ratings for all the movies they reviewed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2504, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the title and star rating of the movie that got the least rating star for each reviewer.", "output": "SELECT T2.title , T1.rID , T1.stars , min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.rID", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Find the title and star rating of the movie that got the least rating star for each reviewer.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2505, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each reviewer id, what is the title and rating for the movie with the smallest rating?", "output": "SELECT T2.title , T1.rID , T1.stars , min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.rID", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: For each reviewer id, what is the title and rating for the movie with the smallest rating?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2506, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the title and score of the movie with the lowest rating among all movies directed by each director.", "output": "SELECT T2.title , T1.stars , T2.director , min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.director", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Find the title and score of the movie with the lowest rating among all movies directed by each director.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2507, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each director, what is the title and score of their most poorly rated movie?", "output": "SELECT T2.title , T1.stars , T2.director , min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.director", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: For each director, what is the title and score of their most poorly rated movie?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2508, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the movie that is rated by most of times?", "output": "SELECT T2.title , T1.mID FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the name of the movie that is rated by most of times?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2509, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the movie that has been reviewed the most?", "output": "SELECT T2.title , T1.mID FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the name of the movie that has been reviewed the most?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2510, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of all movies that have rating star is between 3 and 5?", "output": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the titles of all movies that have rating star is between 3 and 5?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2511, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of all movies that have between 3 and 5 stars?", "output": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the titles of all movies that have between 3 and 5 stars?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2512, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of reviewers who had given higher than 3 star ratings.", "output": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Find the names of reviewers who had given higher than 3 star ratings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2513, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the reviewers who have rated a movie more than 3 stars before?", "output": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars > 3", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of the reviewers who have rated a movie more than 3 stars before?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2514, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average rating star for each movie that are not reviewed by Brittany Harris.", "output": "SELECT mID , avg(stars) FROM Rating WHERE mID NOT IN (SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = \"Brittany Harris\") GROUP BY mID", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Find the average rating star for each movie that are not reviewed by Brittany Harris.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2515, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average rating for each movie that has never been reviewed by Brittany Harris?", "output": "SELECT mID , avg(stars) FROM Rating WHERE mID NOT IN (SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = \"Brittany Harris\") GROUP BY mID", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What is the average rating for each movie that has never been reviewed by Brittany Harris?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2516, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the movies that are not reviewed by Brittany Harris.", "output": "SELECT mID FROM Rating EXCEPT SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = \"Brittany Harris\"", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the ids of the movies that are not reviewed by Brittany Harris.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2517, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all moviest hat have not been reviewed by Britanny Harris?", "output": "SELECT mID FROM Rating EXCEPT SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = \"Brittany Harris\"", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the ids of all moviest hat have not been reviewed by Britanny Harris?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2518, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average rating star for each movie that received at least 2 ratings.", "output": "SELECT mID , avg(stars) FROM Rating GROUP BY mID HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Find the average rating star for each movie that received at least 2 ratings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2519, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each movie that received more than 3 reviews, what is the average rating?", "output": "SELECT mID , avg(stars) FROM Rating GROUP BY mID HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: For each movie that received more than 3 reviews, what is the average rating?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2520, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the ids of reviewers who did not give 4 star.", "output": "SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: find the ids of reviewers who did not give 4 star.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2521, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all reviewers who did not give 4 stars?", "output": "SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars = 4", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the ids of all reviewers who did not give 4 stars?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2522, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the ids of reviewers who didn't only give 4 star.", "output": "SELECT rID FROM Rating WHERE stars != 4", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: Find the ids of reviewers who didn't only give 4 star.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2523, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all reviewers who have not given 4 stars at least once?", "output": "SELECT rID FROM Rating WHERE stars != 4", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the ids of all reviewers who have not given 4 stars at least once?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2524, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are names of the movies that are either made after 2000 or reviewed by Brittany Harris?", "output": "SELECT DISTINCT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Brittany Harris' OR T2.year > 2000", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are names of the movies that are either made after 2000 or reviewed by Brittany Harris?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2525, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all movies that were made after 2000 or reviewed by Brittany Harris?", "output": "SELECT DISTINCT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Brittany Harris' OR T2.year > 2000", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of all movies that were made after 2000 or reviewed by Brittany Harris?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2526, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are names of the movies that are either made before 1980 or directed by James Cameron?", "output": "SELECT title FROM Movie WHERE director = \"James Cameron\" OR YEAR < 1980", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are names of the movies that are either made before 1980 or directed by James Cameron?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2527, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all movies made before 1980 or had James Cameron as the director?", "output": "SELECT title FROM Movie WHERE director = \"James Cameron\" OR YEAR < 1980", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of all movies made before 1980 or had James Cameron as the director?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2528, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of reviewers who had rated 3 star and 4 star?", "output": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 3 INTERSECT SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 4", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of reviewers who had rated 3 star and 4 star?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2529, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all reviewers that have given 3 or 4 stars for reviews?", "output": "SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 3 INTERSECT SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T1.stars = 4", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of all reviewers that have given 3 or 4 stars for reviews?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2530, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of movies that get 3 star and 4 star?", "output": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 3 INTERSECT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 4", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of movies that get 3 star and 4 star?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "movie_1", "id": 2531, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all movies that received 3 or 4 stars?", "output": "SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 3 INTERSECT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars = 4", "input": "Based on \n# the table&column(database schema) information {'Movie': ['mID', 'title', 'year', 'director'], 'Reviewer': ['rID', 'name'], 'Rating': ['rID', 'mID', 'stars', 'ratingDate']} and \n# the user question: What are the names of all movies that received 3 or 4 stars?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2532, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many counties are there?", "output": "SELECT count(*) FROM county_public_safety", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many counties are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2533, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of countries.", "output": "SELECT count(*) FROM county_public_safety", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of countries.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2534, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of counties in descending order of population.", "output": "SELECT Name FROM county_public_safety ORDER BY Population DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of counties in descending order of population.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2535, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the counties of public safety, ordered by population descending?", "output": "SELECT Name FROM county_public_safety ORDER BY Population DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the counties of public safety, ordered by population descending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2536, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the distinct police forces of counties whose location is not on east side.", "output": "SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION != \"East\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the distinct police forces of counties whose location is not on east side.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2537, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different police forces of counties that are not located in the East?", "output": "SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION != \"East\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different police forces of counties that are not located in the East?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2538, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the minimum and maximum crime rate of counties?", "output": "SELECT min(Crime_rate) , max(Crime_rate) FROM county_public_safety", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the minimum and maximum crime rate of counties?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2539, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the minimum and maximum crime rates across all counties.", "output": "SELECT min(Crime_rate) , max(Crime_rate) FROM county_public_safety", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the minimum and maximum crime rates across all counties.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2540, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the crime rates of counties in ascending order of number of police officers.", "output": "SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the crime rates of counties in ascending order of number of police officers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2541, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the crime rates of counties sorted by number of offices ascending?", "output": "SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the crime rates of counties sorted by number of offices ascending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2542, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of cities in ascending alphabetical order?", "output": "SELECT Name FROM city ORDER BY Name ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of cities in ascending alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2543, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of cities, ordered alphabetically.", "output": "SELECT Name FROM city ORDER BY Name ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names of cities, ordered alphabetically.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2544, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the percentage of hispanics in cities with the black percentage higher than 10?", "output": "SELECT Hispanic FROM city WHERE Black > 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the percentage of hispanics in cities with the black percentage higher than 10?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2545, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the hispanic percentage for cities in which the black percentage is greater than 10.", "output": "SELECT Hispanic FROM city WHERE Black > 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the hispanic percentage for cities in which the black percentage is greater than 10.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2546, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of the county with the largest population.", "output": "SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of the county with the largest population.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2547, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the county with the greatest population?", "output": "SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the county with the greatest population?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2548, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of the city with the top 5 white percentages.", "output": "SELECT Name FROM city ORDER BY White DESC LIMIT 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of the city with the top 5 white percentages.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2549, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the five cities with the greatest proportion of white people?", "output": "SELECT Name FROM city ORDER BY White DESC LIMIT 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the five cities with the greatest proportion of white people?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2550, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names of cities and names of counties they are in.", "output": "SELECT T1.Name , T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show names of cities and names of counties they are in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2551, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of cities, as well as the names of the counties they correspond to?", "output": "SELECT T1.Name , T2.Name FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of cities, as well as the names of the counties they correspond to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2552, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show white percentages of cities and the crime rates of counties they are in.", "output": "SELECT T1.White , T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show white percentages of cities and the crime rates of counties they are in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2553, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the white percentages of cities, and the corresponding crime rates of the counties they correspond to?", "output": "SELECT T1.White , T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the white percentages of cities, and the corresponding crime rates of the counties they correspond to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2554, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of cities in the county that has the largest number of police officers.", "output": "SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name of cities in the county that has the largest number of police officers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2555, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of cities that are in the county with the most police officers?", "output": "SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of cities that are in the county with the most police officers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2556, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of cities in counties that have a population more than 20000.", "output": "SELECT count(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of cities in counties that have a population more than 20000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2557, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many cities are in counties that have populations of over 20000?", "output": "SELECT count(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population > 20000)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many cities are in counties that have populations of over 20000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2558, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the crime rate of counties with a city having white percentage more than 90.", "output": "SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID WHERE T1.White > 90", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the crime rate of counties with a city having white percentage more than 90.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2559, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the crime rates of counties that contain cities that have white percentages of over 90?", "output": "SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID WHERE T1.White > 90", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the crime rates of counties that contain cities that have white percentages of over 90?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2560, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the police forces and the number of counties with each police force.", "output": "SELECT Police_force , COUNT(*) FROM county_public_safety GROUP BY Police_force", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the police forces and the number of counties with each police force.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2561, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many counties correspond to each police force?", "output": "SELECT Police_force , COUNT(*) FROM county_public_safety GROUP BY Police_force", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many counties correspond to each police force?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2562, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the location shared by most counties?", "output": "SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the location shared by most counties?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2563, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which location has the most corresponding counties?", "output": "SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which location has the most corresponding counties?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2564, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of counties that do not have any cities.", "output": "SELECT Name FROM county_public_safety WHERE County_ID NOT IN (SELECT County_ID FROM city)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of counties that do not have any cities.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2565, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of counties that do not contain any cities?", "output": "SELECT Name FROM county_public_safety WHERE County_ID NOT IN (SELECT County_ID FROM city)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of counties that do not contain any cities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2566, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the police force shared by counties with location on the east and west.", "output": "SELECT Police_force FROM county_public_safety WHERE LOCATION = \"East\" INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = \"West\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the police force shared by counties with location on the east and west.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2567, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which police forces operate in both counties that are located in the East and in the West?", "output": "SELECT Police_force FROM county_public_safety WHERE LOCATION = \"East\" INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = \"West\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which police forces operate in both counties that are located in the East and in the West?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2568, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of cities in counties that have a crime rate less than 100.", "output": "SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate < 100)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of cities in counties that have a crime rate less than 100.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2569, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of cities that are in counties that have a crime rate below 100?", "output": "SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate < 100)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of cities that are in counties that have a crime rate below 100?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2570, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the case burden of counties in descending order of population.", "output": "SELECT Case_burden FROM county_public_safety ORDER BY Population DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the case burden of counties in descending order of population.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "county_public_safety", "id": 2571, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the case burdens of counties, ordered descending by population?", "output": "SELECT Case_burden FROM county_public_safety ORDER BY Population DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the case burdens of counties, ordered descending by population?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2572, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all modern rooms with a base price below $160 and two beds.", "output": "SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern';", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the names of all modern rooms with a base price below $160 and two beds.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2573, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of modern rooms that have a base price lower than $160 and two beds.", "output": "SELECT roomName FROM Rooms WHERE basePrice < 160 AND beds = 2 AND decor = 'modern';", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What are the names of modern rooms that have a base price lower than $160 and two beds.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2574, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the rooms that have a price higher than 160 and can accommodate more than 2 people. Report room names and ids.", "output": "SELECT roomName , RoomId FROM Rooms WHERE basePrice > 160 AND maxOccupancy > 2;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find all the rooms that have a price higher than 160 and can accommodate more than 2 people. Report room names and ids.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2575, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the room names and ids of all the rooms that cost more than 160 and can accommodate more than two people.", "output": "SELECT roomName , RoomId FROM Rooms WHERE basePrice > 160 AND maxOccupancy > 2;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What are the room names and ids of all the rooms that cost more than 160 and can accommodate more than two people.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2576, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the most popular room in the hotel. The most popular room is the room that had seen the largest number of reservations.", "output": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY count(*) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the most popular room in the hotel. The most popular room is the room that had seen the largest number of reservations.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2577, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which room has the largest number of reservations?", "output": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY count(*) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Which room has the largest number of reservations?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2578, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many kids stay in the rooms reserved by ROY SWEAZY?", "output": "SELECT kids FROM Reservations WHERE FirstName = \"ROY\" AND LastName = \"SWEAZY\";", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: How many kids stay in the rooms reserved by ROY SWEAZY?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2579, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of kids staying in the rooms reserved by a person called ROY SWEAZ.", "output": "SELECT kids FROM Reservations WHERE FirstName = \"ROY\" AND LastName = \"SWEAZY\";", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the number of kids staying in the rooms reserved by a person called ROY SWEAZ.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2580, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many times does ROY SWEAZY has reserved a room.", "output": "SELECT count(*) FROM Reservations WHERE FirstName = \"ROY\" AND LastName = \"SWEAZY\";", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: How many times does ROY SWEAZY has reserved a room.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2581, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of times ROY SWEAZY has reserved a room.", "output": "SELECT count(*) FROM Reservations WHERE FirstName = \"ROY\" AND LastName = \"SWEAZY\";", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the number of times ROY SWEAZY has reserved a room.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2582, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which room has the highest rate? List the room's full name, rate, check in and check out date.", "output": "SELECT T2.roomName , T1.Rate , T1.CheckIn , T1.CheckOut FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY T1.Rate DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Which room has the highest rate? List the room's full name, rate, check in and check out date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2583, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name, rate, check in and check out date for the room with the highest rate.", "output": "SELECT T2.roomName , T1.Rate , T1.CheckIn , T1.CheckOut FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY T1.Rate DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Return the name, rate, check in and check out date for the room with the highest rate.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2584, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many adults stay in the room CONRAD SELBIG checked in on Oct 23, 2010?", "output": "SELECT Adults FROM Reservations WHERE CheckIn = \"2010-10-23\" AND FirstName = \"CONRAD\" AND LastName = \"SELBIG\";", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: How many adults stay in the room CONRAD SELBIG checked in on Oct 23, 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2585, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of adults for the room reserved and checked in by CONRAD SELBIG on Oct 23, 2010.", "output": "SELECT Adults FROM Reservations WHERE CheckIn = \"2010-10-23\" AND FirstName = \"CONRAD\" AND LastName = \"SELBIG\";", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the number of adults for the room reserved and checked in by CONRAD SELBIG on Oct 23, 2010.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2586, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many kids stay in the room DAMIEN TRACHSEL checked in on Sep 21, 2010?", "output": "SELECT Kids FROM Reservations WHERE CheckIn = \"2010-09-21\" AND FirstName = \"DAMIEN\" AND LastName = \"TRACHSEL\";", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: How many kids stay in the room DAMIEN TRACHSEL checked in on Sep 21, 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2587, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the number of kids for the room reserved and checked in by DAMIEN TRACHSEL on Sep 21, 2010.", "output": "SELECT Kids FROM Reservations WHERE CheckIn = \"2010-09-21\" AND FirstName = \"DAMIEN\" AND LastName = \"TRACHSEL\";", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Return the number of kids for the room reserved and checked in by DAMIEN TRACHSEL on Sep 21, 2010.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2588, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many king beds are there?", "output": "SELECT sum(beds) FROM Rooms WHERE bedtype = 'King';", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: How many king beds are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2589, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total number of king beds available.", "output": "SELECT sum(beds) FROM Rooms WHERE bedtype = 'King';", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the total number of king beds available.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2590, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names and decor of rooms that have a king bed. Sort the list by their price.", "output": "SELECT roomName , decor FROM Rooms WHERE bedtype = 'King' ORDER BY basePrice;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: List the names and decor of rooms that have a king bed. Sort the list by their price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2591, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and decor of rooms with a king bed? Sort them by their price", "output": "SELECT roomName , decor FROM Rooms WHERE bedtype = 'King' ORDER BY basePrice;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What are the names and decor of rooms with a king bed? Sort them by their price,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2592, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which room has cheapest base price? List the room's name and the base price.", "output": "SELECT roomName , basePrice FROM Rooms ORDER BY basePrice ASC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Which room has cheapest base price? List the room's name and the base price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2593, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the room name and base price of the room with the lowest base price?", "output": "SELECT roomName , basePrice FROM Rooms ORDER BY basePrice ASC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What are the room name and base price of the room with the lowest base price?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2594, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the decor of room Recluse and defiance?", "output": "SELECT decor FROM Rooms WHERE roomName = \"Recluse and defiance\";", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What is the decor of room Recluse and defiance?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2595, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the decor of the room named \"Recluse and defiance\".", "output": "SELECT decor FROM Rooms WHERE roomName = \"Recluse and defiance\";", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Return the decor of the room named \"Recluse and defiance\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2596, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average base price of different bed type? List bed type and average base price.", "output": "SELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What is the average base price of different bed type? List bed type and average base price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2597, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each bed type, find the average base price of different bed type.", "output": "SELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: For each bed type, find the average base price of different bed type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2598, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of people who could stay in the modern rooms in this inn?", "output": "SELECT sum(maxOccupancy) FROM Rooms WHERE decor = 'modern';", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What is the total number of people who could stay in the modern rooms in this inn?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2599, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many people in total can stay in the modern rooms of this inn?", "output": "SELECT sum(maxOccupancy) FROM Rooms WHERE decor = 'modern';", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: How many people in total can stay in the modern rooms of this inn?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2600, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What kind of decor has the least number of reservations?", "output": "SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY count(T2.decor) ASC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What kind of decor has the least number of reservations?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2601, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the least popular kind of decor?", "output": "SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY count(T2.decor) ASC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What is the least popular kind of decor?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2602, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2603, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many times the number of adults and kids staying in a room reached the maximum capacity of the room?", "output": "SELECT count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: How many times the number of adults and kids staying in a room reached the maximum capacity of the room?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2604, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first and last names of people who payed more than the rooms' base prices.", "output": "SELECT T1.firstname , T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the first and last names of people who payed more than the rooms' base prices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2605, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of people who payed more than the rooms' base prices?", "output": "SELECT T1.firstname , T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What are the first and last names of people who payed more than the rooms' base prices?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2606, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many rooms are there?", "output": "SELECT count(*) FROM Rooms;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: How many rooms are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2607, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of rooms available in this inn?", "output": "SELECT count(*) FROM Rooms;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What is the total number of rooms available in this inn?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2608, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of rooms with a king bed.", "output": "SELECT count(*) FROM Rooms WHERE bedType = \"King\";", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the number of rooms with a king bed.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2609, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many rooms have a king bed?", "output": "SELECT count(*) FROM Rooms WHERE bedType = \"King\";", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: How many rooms have a king bed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2610, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of rooms for each bed type.", "output": "SELECT bedType , count(*) FROM Rooms GROUP BY bedType;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the number of rooms for each bed type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2611, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the number of rooms for each bed type?", "output": "SELECT bedType , count(*) FROM Rooms GROUP BY bedType;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What are the number of rooms for each bed type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2612, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the room with the maximum occupancy.", "output": "SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the name of the room with the maximum occupancy.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2613, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the room that can accommodate the most people?", "output": "SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What is the name of the room that can accommodate the most people?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2614, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id and name of the most expensive base price room.", "output": "SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the id and name of the most expensive base price room.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2615, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which room has the highest base price?", "output": "SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Which room has the highest base price?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2616, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the type of bed and name of all traditional rooms.", "output": "SELECT roomName , bedType FROM Rooms WHERE decor = \"traditional\";", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: List the type of bed and name of all traditional rooms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2617, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the bed type and name of all the rooms with traditional decor?", "output": "SELECT roomName , bedType FROM Rooms WHERE decor = \"traditional\";", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What are the bed type and name of all the rooms with traditional decor?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2618, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of rooms with king bed for each decor type.", "output": "SELECT decor , count(*) FROM Rooms WHERE bedType = \"King\" GROUP BY decor;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the number of rooms with king bed for each decor type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2619, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many rooms have king beds? Report the number for each decor type.", "output": "SELECT decor , count(*) FROM Rooms WHERE bedType = \"King\" GROUP BY decor;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: How many rooms have king beds? Report the number for each decor type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2620, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average and minimum price of the rooms in different decor.", "output": "SELECT decor , avg(basePrice) , min(basePrice) FROM Rooms GROUP BY decor;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the average and minimum price of the rooms in different decor.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2621, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average minimum and price of the rooms for each different decor.", "output": "SELECT decor , avg(basePrice) , min(basePrice) FROM Rooms GROUP BY decor;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What is the average minimum and price of the rooms for each different decor.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2622, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of all rooms sorted by their prices.", "output": "SELECT roomName FROM Rooms ORDER BY basePrice;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: List the name of all rooms sorted by their prices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2623, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Sort all the rooms according to the price. Just report the room names.", "output": "SELECT roomName FROM Rooms ORDER BY basePrice;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Sort all the rooms according to the price. Just report the room names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2624, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of rooms with price higher than 120 for different decor.", "output": "SELECT decor , count(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the number of rooms with price higher than 120 for different decor.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2625, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many rooms cost more than 120, for each different decor?", "output": "SELECT decor , count(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: How many rooms cost more than 120, for each different decor?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2626, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each bed type, find the average room price.", "output": "SELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: For each bed type, find the average room price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2627, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average base price of rooms, for each bed type?", "output": "SELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What is the average base price of rooms, for each bed type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2628, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of rooms with king or queen bed.", "output": "SELECT roomName FROM Rooms WHERE bedType = \"King\" OR bedType = \"Queen\";", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: List the name of rooms with king or queen bed.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2629, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of rooms that have either king or queen bed?", "output": "SELECT roomName FROM Rooms WHERE bedType = \"King\" OR bedType = \"Queen\";", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What are the names of rooms that have either king or queen bed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2630, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different types of beds are there?", "output": "SELECT count(DISTINCT bedType) FROM Rooms;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: How many different types of beds are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2631, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of distinct bed types available in this inn.", "output": "SELECT count(DISTINCT bedType) FROM Rooms;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the number of distinct bed types available in this inn.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2632, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and id of the top 3 expensive rooms.", "output": "SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the name and id of the top 3 expensive rooms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2633, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and id of the three highest priced rooms?", "output": "SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3;", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What are the name and id of the three highest priced rooms?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2634, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of rooms whose price is higher than the average price.", "output": "SELECT roomName FROM Rooms WHERE basePrice > ( SELECT avg(basePrice) FROM Rooms );", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the name of rooms whose price is higher than the average price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2635, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name of rooms that cost more than the average.", "output": "SELECT roomName FROM Rooms WHERE basePrice > ( SELECT avg(basePrice) FROM Rooms );", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What are the name of rooms that cost more than the average.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2636, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of rooms that do not have any reservation.", "output": "SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations)", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the number of rooms that do not have any reservation.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2637, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many rooms have not had any reservation yet?", "output": "SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations)", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: How many rooms have not had any reservation yet?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2638, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name and number of reservations made for each of the rooms.", "output": "SELECT T2.roomName , count(*) , T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Return the name and number of reservations made for each of the rooms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2639, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each room, find its name and the number of times reservations were made for it.", "output": "SELECT T2.roomName , count(*) , T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: For each room, find its name and the number of times reservations were made for it.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2640, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of rooms that have been reserved for more than 60 times.", "output": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING count(*) > 60", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the names of rooms that have been reserved for more than 60 times.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2641, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of rooms whose reservation frequency exceeds 60 times?", "output": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING count(*) > 60", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What are the names of rooms whose reservation frequency exceeds 60 times?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2642, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of rooms whose base price is between 120 and 150.", "output": "SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the name of rooms whose base price is between 120 and 150.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2643, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which rooms cost between 120 and 150? Give me the room names.", "output": "SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Which rooms cost between 120 and 150? Give me the room names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2644, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of rooms booked by some customers whose first name contains ROY.", "output": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%'", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: Find the name of rooms booked by some customers whose first name contains ROY.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "inn_1", "id": 2645, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name of rooms booked by customers whose first name has \"ROY\" in part?", "output": "SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%'", "input": "Based on \n# the table&column(database schema) information {'Rooms': ['RoomId', 'roomName', 'beds', 'bedType', 'maxOccupancy', 'basePrice', 'decor'], 'Reservations': ['Code', 'Room', 'CheckIn', 'CheckOut', 'Rate', 'LastName', 'FirstName', 'Adults', 'Kids']} and \n# the user question: What are the name of rooms booked by customers whose first name has \"ROY\" in part?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_mdm", "id": 2646, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what are the details of the cmi masters that have the cross reference code 'Tax'?", "output": "SELECT T1.cmi_details FROM Customer_Master_Index AS T1 JOIN CMI_Cross_References AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T2.source_system_code = 'Tax'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what are the details of the cmi masters that have the cross reference code 'Tax'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_mdm", "id": 2647, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T1.cmi_cross_ref_id , T1.source_system_code FROM CMI_Cross_References AS T1 JOIN Council_Tax AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T1.cmi_cross_ref_id HAVING count(*) >= 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_mdm", "id": 2648, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many business rates are related to each cmi cross reference? List cross reference id, master customer id and the n", "output": "SELECT T2.cmi_cross_ref_id , T2.master_customer_id , count(*) FROM Business_Rates AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T2.cmi_cross_ref_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many business rates are related to each cmi cross reference? List cross reference id, master customer id and the n,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_mdm", "id": 2649, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id.", "output": "SELECT T1.source_system_code , T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Benefits_Overpayments AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id ORDER BY T2.council_tax_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_mdm", "id": 2650, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Wat is the tax source system code and master customer id of the taxes related to each parking fine id?", "output": "SELECT T1.source_system_code , T1.master_customer_id , T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Parking_Fines AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Wat is the tax source system code and master customer id of the taxes related to each parking fine id?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_mdm", "id": 2651, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'?", "output": "SELECT T1.council_tax_id FROM Rent_Arrears AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id JOIN Customer_Master_Index AS T3 ON T3.master_customer_id = T2.master_customer_id WHERE T3.cmi_details != 'Schmidt , Kertzmann and Lubowitz'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_mdm", "id": 2652, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the register ids of electoral registries that have the cross reference source system code 'Electoral' or 'Tax'?", "output": "SELECT T1.electoral_register_id FROM Electoral_Register AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id WHERE T2.source_system_code = 'Electoral' OR T2.source_system_code = 'Tax'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the register ids of electoral registries that have the cross reference source system code 'Electoral' or 'Tax'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_mdm", "id": 2653, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different source system code for the cmi cross references are there?", "output": "SELECT count(DISTINCT source_system_code) FROM CMI_cross_references", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different source system code for the cmi cross references are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_mdm", "id": 2654, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all information about customer master index, and sort them by details in descending order.", "output": "SELECT * FROM customer_master_index ORDER BY cmi_details DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all information about customer master index, and sort them by details in descending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_mdm", "id": 2655, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the council tax ids and their related cmi cross references of all the parking fines.", "output": "SELECT council_tax_id , cmi_cross_ref_id FROM parking_fines", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the council tax ids and their related cmi cross references of all the parking fines.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_mdm", "id": 2656, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many council taxes are collected for renting arrears ?", "output": "SELECT count(*) FROM rent_arrears", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many council taxes are collected for renting arrears ?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_mdm", "id": 2657, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct cross reference source system codes which are related to the master customer details 'Gottlieb, Becker and Wyman'?", "output": "SELECT DISTINCT T2.source_system_code FROM customer_master_index AS T1 JOIN cmi_cross_references AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T1.cmi_details = 'Gottlieb , Becker and Wyman'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct cross reference source system codes which are related to the master customer details 'Gottlieb, Becker and Wyman'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_mdm", "id": 2658, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which cmi cross reference id is not related to any parking taxes?", "output": "SELECT cmi_cross_ref_id FROM cmi_cross_references EXCEPT SELECT cmi_cross_ref_id FROM parking_fines", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which cmi cross reference id is not related to any parking taxes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_mdm", "id": 2659, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which distinct source system code includes the substring 'en'?", "output": "SELECT DISTINCT source_system_code FROM cmi_cross_references WHERE source_system_code LIKE '%en%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which distinct source system code includes the substring 'en'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2660, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many parties are there?", "output": "SELECT count(*) FROM party", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many parties are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2661, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of parties.", "output": "SELECT count(*) FROM party", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of parties.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2662, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the themes of parties in ascending order of number of hosts.", "output": "SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the themes of parties in ascending order of number of hosts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2663, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the themes of parties ordered by the number of hosts in ascending manner?", "output": "SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the themes of parties ordered by the number of hosts in ascending manner?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2664, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the themes and locations of parties?", "output": "SELECT Party_Theme , LOCATION FROM party", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the themes and locations of parties?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2665, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the theme and location of each party.", "output": "SELECT Party_Theme , LOCATION FROM party", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the theme and location of each party.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2666, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the first year and last year of parties with theme \"Spring\" or \"Teqnology\".", "output": "SELECT First_year , Last_year FROM party WHERE Party_Theme = \"Spring\" OR Party_Theme = \"Teqnology\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the first year and last year of parties with theme \"Spring\" or \"Teqnology\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2667, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first year and last year of the parties whose theme is \"Spring\" or \"Teqnology\"?", "output": "SELECT First_year , Last_year FROM party WHERE Party_Theme = \"Spring\" OR Party_Theme = \"Teqnology\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first year and last year of the parties whose theme is \"Spring\" or \"Teqnology\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2668, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of hosts for parties?", "output": "SELECT avg(Number_of_hosts) FROM party", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average number of hosts for parties?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2669, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Compute the average number of hosts for parties.", "output": "SELECT avg(Number_of_hosts) FROM party", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Compute the average number of hosts for parties.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2670, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the location of the party with the most hosts?", "output": "SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the location of the party with the most hosts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2671, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which party had the most hosts? Give me the party location.", "output": "SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which party had the most hosts? Give me the party location.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2672, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show different nationalities along with the number of hosts of each nationality.", "output": "SELECT Nationality , COUNT(*) FROM HOST GROUP BY Nationality", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show different nationalities along with the number of hosts of each nationality.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2673, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many hosts does each nationality have? List the nationality and the count.", "output": "SELECT Nationality , COUNT(*) FROM HOST GROUP BY Nationality", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many hosts does each nationality have? List the nationality and the count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2674, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the most common nationality of hosts.", "output": "SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the most common nationality of hosts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2675, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which nationality has the most hosts?", "output": "SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which nationality has the most hosts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2676, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the nations that have both hosts older than 45 and hosts younger than 35.", "output": "SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the nations that have both hosts older than 45 and hosts younger than 35.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2677, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which nations have both hosts of age above 45 and hosts of age below 35?", "output": "SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which nations have both hosts of age above 45 and hosts of age below 35?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2678, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the themes of parties and the names of the party hosts.", "output": "SELECT T3.Party_Theme , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the themes of parties and the names of the party hosts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2679, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each party, return its theme and the name of its host.", "output": "SELECT T3.Party_Theme , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each party, return its theme and the name of its host.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2680, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the locations of parties and the names of the party hosts in ascending order of the age of the host.", "output": "SELECT T3.Location , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the locations of parties and the names of the party hosts in ascending order of the age of the host.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2681, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each party, find its location and the name of its host. Sort the result in ascending order of the age of the host.", "output": "SELECT T3.Location , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each party, find its location and the name of its host. Sort the result in ascending order of the age of the host.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2682, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the locations of parties with hosts older than 50.", "output": "SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the locations of parties with hosts older than 50.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2683, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which parties have hosts of age above 50? Give me the party locations.", "output": "SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which parties have hosts of age above 50? Give me the party locations.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2684, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the host names for parties with number of hosts greater than 20.", "output": "SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the host names for parties with number of hosts greater than 20.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2685, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which parties have more than 20 hosts? Give me the host names for these parties.", "output": "SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which parties have more than 20 hosts? Give me the host names for these parties.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2686, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name and the nationality of the oldest host.", "output": "SELECT Name , Nationality FROM HOST ORDER BY Age DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name and the nationality of the oldest host.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2687, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and the nationality of the host of the highest age?", "output": "SELECT Name , Nationality FROM HOST ORDER BY Age DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name and the nationality of the host of the highest age?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2688, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of hosts who did not serve as a host of any party in our record.", "output": "SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of hosts who did not serve as a host of any party in our record.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "party_host", "id": 2689, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of hosts who did not host any party in our record?", "output": "SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of hosts who did not host any party in our record?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2690, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many regions do we have?", "output": "SELECT count(*) FROM region", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many regions do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2691, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of regions.", "output": "SELECT count(*) FROM region", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of regions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2692, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all region code and region name sorted by the codes.", "output": "SELECT region_code , region_name FROM region ORDER BY region_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all region code and region name sorted by the codes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2693, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the codes and names for all regions, sorted by codes?", "output": "SELECT region_code , region_name FROM region ORDER BY region_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the codes and names for all regions, sorted by codes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2694, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all region names in alphabetical order.", "output": "SELECT region_name FROM region ORDER BY region_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all region names in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2695, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the regions in alphabetical order?", "output": "SELECT region_name FROM region ORDER BY region_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the regions in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2696, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names for all regions except for Denmark.", "output": "SELECT region_name FROM region WHERE region_name != 'Denmark'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show names for all regions except for Denmark.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2697, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of all regions other than Denmark.", "output": "SELECT region_name FROM region WHERE region_name != 'Denmark'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names of all regions other than Denmark.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2698, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many storms had death records?", "output": "SELECT count(*) FROM storm WHERE Number_Deaths > 0", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many storms had death records?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2699, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of storms in which at least 1 person died.", "output": "SELECT count(*) FROM storm WHERE Number_Deaths > 0", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of storms in which at least 1 person died.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2700, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List name, dates active, and number of deaths for all storms with at least 1 death.", "output": "SELECT name , dates_active , number_deaths FROM storm WHERE number_deaths >= 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List name, dates active, and number of deaths for all storms with at least 1 death.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2701, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names, dates active, and number of deaths for storms that had 1 or more death?", "output": "SELECT name , dates_active , number_deaths FROM storm WHERE number_deaths >= 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names, dates active, and number of deaths for storms that had 1 or more death?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2702, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average and maximum damage for all storms with max speed higher than 1000.", "output": "SELECT avg(damage_millions_USD) , max(damage_millions_USD) FROM storm WHERE max_speed > 1000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the average and maximum damage for all storms with max speed higher than 1000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2703, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average and maximum damage in millions for storms that had a max speed over 1000?", "output": "SELECT avg(damage_millions_USD) , max(damage_millions_USD) FROM storm WHERE max_speed > 1000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average and maximum damage in millions for storms that had a max speed over 1000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2704, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of deaths and damage for all storms with a max speed greater than the average?", "output": "SELECT sum(number_deaths) , sum(damage_millions_USD) FROM storm WHERE max_speed > (SELECT avg(max_speed) FROM storm)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of deaths and damage for all storms with a max speed greater than the average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2705, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the total number of deaths and total damange in millions for storms that had a max speed greater than the average.", "output": "SELECT sum(number_deaths) , sum(damage_millions_USD) FROM storm WHERE max_speed > (SELECT avg(max_speed) FROM storm)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the total number of deaths and total damange in millions for storms that had a max speed greater than the average.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2706, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List name and damage for all storms in a descending order of max speed.", "output": "SELECT name , damage_millions_USD FROM storm ORDER BY max_speed DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List name and damage for all storms in a descending order of max speed.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2707, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and damage in millions for storms, ordered by their max speeds descending?", "output": "SELECT name , damage_millions_USD FROM storm ORDER BY max_speed DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and damage in millions for storms, ordered by their max speeds descending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2708, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many regions are affected?", "output": "SELECT count(DISTINCT region_id) FROM affected_region", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many regions are affected?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2709, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different affected regions.", "output": "SELECT count(DISTINCT region_id) FROM affected_region", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of different affected regions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2710, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name for regions not affected.", "output": "SELECT region_name FROM region WHERE region_id NOT IN (SELECT region_id FROM affected_region)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name for regions not affected.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2711, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of regions that were not affected?", "output": "SELECT region_name FROM region WHERE region_id NOT IN (SELECT region_id FROM affected_region)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of regions that were not affected?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2712, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name for regions and the number of storms for each region.", "output": "SELECT T1.region_name , count(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name for regions and the number of storms for each region.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2713, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many storms occured in each region?", "output": "SELECT T1.region_name , count(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many storms occured in each region?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2714, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name for storms and the number of affected regions for each storm.", "output": "SELECT T1.name , count(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name for storms and the number of affected regions for each storm.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2715, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many regions were affected by each storm?", "output": "SELECT T1.name , count(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many regions were affected by each storm?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2716, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the storm name and max speed which affected the greatest number of regions?", "output": "SELECT T1.name , T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the storm name and max speed which affected the greatest number of regions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2717, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name and max speed of the storm that affected the most regions.", "output": "SELECT T1.name , T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the name and max speed of the storm that affected the most regions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2718, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of storms which don't have affected region in record.", "output": "SELECT name FROM storm WHERE storm_id NOT IN (SELECT storm_id FROM affected_region)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name of storms which don't have affected region in record.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2719, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of storms that did not affect any regions?", "output": "SELECT name FROM storm WHERE storm_id NOT IN (SELECT storm_id FROM affected_region)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of storms that did not affect any regions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2720, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show storm name with at least two regions and 10 cities affected.", "output": "SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING count(*) >= 2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING sum(T2.number_city_affected) >= 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show storm name with at least two regions and 10 cities affected.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2721, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of storms that both affected two or more regions and affected a total of 10 or more cities?", "output": "SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING count(*) >= 2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING sum(T2.number_city_affected) >= 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of storms that both affected two or more regions and affected a total of 10 or more cities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2722, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all storm names except for those with at least two affected regions.", "output": "SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all storm names except for those with at least two affected regions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2723, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of storms that did not affect two or more regions?", "output": "SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of storms that did not affect two or more regions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2724, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the region names affected by the storm with a number of deaths of least 10?", "output": "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the region names affected by the storm with a number of deaths of least 10?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2725, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of the regions affected by storms that had a death count of at least 10.", "output": "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names of the regions affected by storms that had a death count of at least 10.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2726, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all storm names affecting region \"Denmark\".", "output": "SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Denmark'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all storm names affecting region \"Denmark\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2727, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the storms that affected Denmark?", "output": "SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Denmark'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the storms that affected Denmark?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2728, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the region name with at least two storms.", "output": "SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the region name with at least two storms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2729, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of regions with two or more storms?", "output": "SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of regions with two or more storms?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2730, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the regions which were affected by the storm that killed the greatest number of people.", "output": "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the regions which were affected by the storm that killed the greatest number of people.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2731, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of regions that were affected by the storm in which the most people died?", "output": "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of regions that were affected by the storm in which the most people died?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2732, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the storm that affected both Afghanistan and Albania regions.", "output": "SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the storm that affected both Afghanistan and Albania regions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "storm_record", "id": 2733, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the storms that affected both the regions of Afghanistan and Albania?", "output": "SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the storms that affected both the regions of Afghanistan and Albania?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2734, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many counties are there in total?", "output": "SELECT count(*) FROM county", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many counties are there in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2735, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the total number of counties.", "output": "SELECT count(*) FROM county", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the total number of counties.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2736, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the county name and population of all counties.", "output": "SELECT County_name , Population FROM county", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the county name and population of all counties.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2737, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and population of each county?", "output": "SELECT County_name , Population FROM county", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name and population of each county?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2738, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average population of all counties.", "output": "SELECT avg(Population) FROM county", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the average population of all counties.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2739, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "On average how large is the population of the counties?", "output": "SELECT avg(Population) FROM county", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: On average how large is the population of the counties?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2740, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the maximum and minimum population among all counties.", "output": "SELECT max(Population) , min(Population) FROM county", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the maximum and minimum population among all counties.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2741, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum and minimum population of the counties?", "output": "SELECT max(Population) , min(Population) FROM county", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum and minimum population of the counties?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2742, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all the distinct districts for elections.", "output": "SELECT DISTINCT District FROM election", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all the distinct districts for elections.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2743, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct districts for elections?", "output": "SELECT DISTINCT District FROM election", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct districts for elections?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2744, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the zip code of the county with name \"Howard\".", "output": "SELECT Zip_code FROM county WHERE County_name = \"Howard\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the zip code of the county with name \"Howard\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2745, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the zip code the county named \"Howard\" is located in?", "output": "SELECT Zip_code FROM county WHERE County_name = \"Howard\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the zip code the county named \"Howard\" is located in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2746, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the delegate from district 1 in election.", "output": "SELECT Delegate FROM election WHERE District = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the delegate from district 1 in election.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2747, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the delegate of district 1 in the elections?", "output": "SELECT Delegate FROM election WHERE District = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who is the delegate of district 1 in the elections?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2748, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the delegate and committee information of elections.", "output": "SELECT Delegate , Committee FROM election", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the delegate and committee information of elections.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2749, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the delegate and committee information for each election record?", "output": "SELECT Delegate , Committee FROM election", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the delegate and committee information for each election record?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2750, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct governors are there?", "output": "SELECT count(DISTINCT Governor) FROM party", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct governors are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2751, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of distinct governors.", "output": "SELECT count(DISTINCT Governor) FROM party", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of distinct governors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2752, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the lieutenant governor and comptroller from the democratic party.", "output": "SELECT Lieutenant_Governor , Comptroller FROM party WHERE Party = \"Democratic\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the lieutenant governor and comptroller from the democratic party.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2753, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the lieutenant governor and comptroller from the democratic party?", "output": "SELECT Lieutenant_Governor , Comptroller FROM party WHERE Party = \"Democratic\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who are the lieutenant governor and comptroller from the democratic party?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2754, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In which distinct years was the governor \"Eliot Spitzer\"?", "output": "SELECT DISTINCT YEAR FROM party WHERE Governor = \"Eliot Spitzer\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: In which distinct years was the governor \"Eliot Spitzer\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2755, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct years when the governor was named \"Eliot Spitzer\".", "output": "SELECT DISTINCT YEAR FROM party WHERE Governor = \"Eliot Spitzer\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the distinct years when the governor was named \"Eliot Spitzer\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2756, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all the information about election.", "output": "SELECT * FROM election", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all the information about election.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2757, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return all the information for each election record.", "output": "SELECT * FROM election", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return all the information for each election record.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2758, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the delegates and the names of county they belong to.", "output": "SELECT T2.Delegate , T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the delegates and the names of county they belong to.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2759, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the delegate and name of the county they belong to, for each county?", "output": "SELECT T2.Delegate , T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the delegate and name of the county they belong to, for each county?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2760, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which delegates are from counties with population smaller than 100000?", "output": "SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which delegates are from counties with population smaller than 100000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2761, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the delegates who are from counties with population below 100000.", "output": "SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the delegates who are from counties with population below 100000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2762, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct delegates are from counties with population larger than 50000?", "output": "SELECT count(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct delegates are from counties with population larger than 50000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2763, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of distinct delegates who are from counties with population above 50000.", "output": "SELECT count(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of distinct delegates who are from counties with population above 50000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2764, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the county that the delegates on \"Appropriations\" committee belong to?", "output": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = \"Appropriations\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the county that the delegates on \"Appropriations\" committee belong to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2765, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which county do the delegates on \"Appropriations\" committee belong to? Give me the county names.", "output": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = \"Appropriations\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which county do the delegates on \"Appropriations\" committee belong to? Give me the county names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2766, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the delegates and the names of the party they belong to.", "output": "SELECT T1.Delegate , T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the delegates and the names of the party they belong to.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2767, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each delegate, find the names of the party they are part of.", "output": "SELECT T1.Delegate , T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each delegate, find the names of the party they are part of.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2768, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who were the governors of the parties associated with delegates from district 1?", "output": "SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who were the governors of the parties associated with delegates from district 1?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2769, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the parties associated with the delegates from district 1. Who served as governors of the parties?", "output": "SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the parties associated with the delegates from district 1. Who served as governors of the parties?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2770, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who were the comptrollers of the parties associated with the delegates from district 1 or district 2?", "output": "SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who were the comptrollers of the parties associated with the delegates from district 1 or district 2?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2771, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the parties associated with the delegates from district 1 or 2. Who served as comptrollers of the parties?", "output": "SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the parties associated with the delegates from district 1 or 2. Who served as comptrollers of the parties?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2772, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return all the committees that have delegates from Democratic party.", "output": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Democratic\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return all the committees that have delegates from Democratic party.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2773, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which committees have delegates from the Democratic party?", "output": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Democratic\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which committees have delegates from the Democratic party?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2774, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of each county along with the corresponding number of delegates from that county.", "output": "SELECT T1.County_name , COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name of each county along with the corresponding number of delegates from that county.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2775, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each county, find the name of the county and the number of delegates from that county.", "output": "SELECT T1.County_name , COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each county, find the name of the county and the number of delegates from that county.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2776, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of each party and the corresponding number of delegates from that party.", "output": "SELECT T2.Party , COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name of each party and the corresponding number of delegates from that party.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2777, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each party, return the name of the party and the number of delegates from that party.", "output": "SELECT T2.Party , COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each party, return the name of the party and the number of delegates from that party.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2778, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of all counties sorted by population in ascending order.", "output": "SELECT County_name FROM county ORDER BY Population ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names of all counties sorted by population in ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2779, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Sort the names of all counties in ascending order of population.", "output": "SELECT County_name FROM county ORDER BY Population ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Sort the names of all counties in ascending order of population.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2780, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of all counties sorted by county name in descending alphabetical order.", "output": "SELECT County_name FROM county ORDER BY County_name DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names of all counties sorted by county name in descending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2781, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Sort the names of all counties in descending alphabetical order.", "output": "SELECT County_name FROM county ORDER BY County_name DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Sort the names of all counties in descending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2782, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of the county with the biggest population.", "output": "SELECT County_name FROM county ORDER BY Population DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name of the county with the biggest population.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2783, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which county has the largest population? Give me the name of the county.", "output": "SELECT County_name FROM county ORDER BY Population DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which county has the largest population? Give me the name of the county.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2784, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the 3 counties with the smallest population.", "output": "SELECT County_name FROM county ORDER BY Population ASC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the 3 counties with the smallest population.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2785, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the 3 counties that have the smallest population? Give me the county names.", "output": "SELECT County_name FROM county ORDER BY Population ASC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the 3 counties that have the smallest population? Give me the county names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2786, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of counties that have at least two delegates.", "output": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of counties that have at least two delegates.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2787, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which counties have two or more delegates? Give me the county names.", "output": "SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which counties have two or more delegates? Give me the county names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2788, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of the party that has at least two records.", "output": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name of the party that has at least two records.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2789, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which party has two or more records?", "output": "SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which party has two or more records?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2790, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of the party that has the most delegates.", "output": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name of the party that has the most delegates.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2791, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which party has the largest number of delegates?", "output": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which party has the largest number of delegates?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2792, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the people that have been governor the most times.", "output": "SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the people that have been governor the most times.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2793, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which people severed as governor most frequently?", "output": "SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which people severed as governor most frequently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2794, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the people that have been comptroller the most times and the corresponding number of times.", "output": "SELECT Comptroller , COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the people that have been comptroller the most times and the corresponding number of times.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2795, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which people severed as comptroller most frequently? Give me the name of the person and the frequency count.", "output": "SELECT Comptroller , COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which people severed as comptroller most frequently? Give me the name of the person and the frequency count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2796, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of parties that do not have delegates in election?", "output": "SELECT Party FROM party WHERE Party_ID NOT IN (SELECT Party FROM election)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of parties that do not have delegates in election?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2797, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which parties did not have any delegates in elections?", "output": "SELECT Party FROM party WHERE Party_ID NOT IN (SELECT Party FROM election)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which parties did not have any delegates in elections?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2798, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of parties that have both delegates on \"Appropriations\" committee and", "output": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = \"Appropriations\" INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = \"Economic Matters\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of parties that have both delegates on \"Appropriations\" committee and,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2799, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which parties have delegates in both the \"Appropriations\" committee and the \"Economic Matters\" committee?", "output": "SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = \"Appropriations\" INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = \"Economic Matters\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which parties have delegates in both the \"Appropriations\" committee and the \"Economic Matters\" committee?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2800, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which committees have delegates from both democratic party and liberal party?", "output": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Democratic\" INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Liberal\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which committees have delegates from both democratic party and liberal party?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "election", "id": 2801, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the committees that have delegates both from from the democratic party and the liberal party.", "output": "SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Democratic\" INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = \"Liberal\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the committees that have delegates both from from the democratic party and the liberal party.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2802, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many journalists are there?", "output": "SELECT count(*) FROM journalist", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: How many journalists are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2803, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of journalists in ascending order of years working.", "output": "SELECT Name FROM journalist ORDER BY Years_working ASC", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: List the names of journalists in ascending order of years working.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2804, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the nationalities and ages of journalists?", "output": "SELECT Nationality , Age FROM journalist", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: What are the nationalities and ages of journalists?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2805, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of journalists from \"England\" or \"Wales\".", "output": "SELECT Name FROM journalist WHERE Nationality = \"England\" OR Nationality = \"Wales\"", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: Show the names of journalists from \"England\" or \"Wales\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2806, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of years spent working as a journalist?", "output": "SELECT avg(Years_working) FROM journalist", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: What is the average number of years spent working as a journalist?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2807, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the nationality of the journalist with the largest number of years working?", "output": "SELECT Nationality FROM journalist ORDER BY Years_working DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: What is the nationality of the journalist with the largest number of years working?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2808, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the different nationalities and the number of journalists of each nationality.", "output": "SELECT Nationality , COUNT(*) FROM journalist GROUP BY Nationality", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: Show the different nationalities and the number of journalists of each nationality.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2809, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the most common nationality for journalists.", "output": "SELECT Nationality FROM journalist GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: Show the most common nationality for journalists.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2810, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working.", "output": "SELECT Nationality FROM journalist WHERE Years_working > 10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working < 3", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2811, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the dates, places, and names of events in descending order of the attendance.", "output": "SELECT Date , Name , venue FROM event ORDER BY Event_Attendance DESC", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: Show the dates, places, and names of events in descending order of the attendance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2812, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of journalists and the dates of the events they reported.", "output": "SELECT T3.Name , T2.Date FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: Show the names of journalists and the dates of the events they reported.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2813, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of journalists and the names of the events they reported in ascending order", "output": "SELECT T3.Name , T2.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID ORDER BY T2.Event_Attendance ASC", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: Show the names of journalists and the names of the events they reported in ascending order,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2814, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of journalists and the number of events they reported.", "output": "SELECT T3.Name , COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: Show the names of journalists and the number of events they reported.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2815, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of journalists that have reported more than one event.", "output": "SELECT T3.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: Show the names of journalists that have reported more than one event.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2816, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of journalists who have not reported any event.", "output": "SELECT Name FROM journalist WHERE journalist_ID NOT IN (SELECT journalist_ID FROM news_report)", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: List the names of journalists who have not reported any event.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2817, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what are the average and maximum attendances of all events?", "output": "SELECT avg(Event_Attendance) , max(Event_Attendance) FROM event", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: what are the average and maximum attendances of all events?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2818, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average age and experience working length of journalists working on different role type.", "output": "SELECT avg(t1.age) , avg(Years_working) , t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id = t2.journalist_id GROUP BY t2.work_type", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: Find the average age and experience working length of journalists working on different role type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "news_report", "id": 2819, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the event venues and names that have the top 2 most number of people attended.", "output": "SELECT venue , name FROM event ORDER BY Event_Attendance DESC LIMIT 2", "input": "Based on \n# the table&column(database schema) information {'event': ['Event_ID', 'Date', 'Venue', 'Name', 'Event_Attendance'], 'journalist': ['journalist_ID', 'Name', 'Nationality', 'Age', 'Years_working'], 'news_report': ['journalist_ID', 'Event_ID', 'Work_Type']} and \n# the user question: List the event venues and names that have the top 2 most number of people attended.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2820, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show me all the restaurants.", "output": "SELECT ResName FROM Restaurant;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show me all the restaurants.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2821, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the address of the restaurant Subway?", "output": "SELECT Address FROM Restaurant WHERE ResName = \"Subway\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the address of the restaurant Subway?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2822, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the rating of the restaurant Subway?", "output": "SELECT Rating FROM Restaurant WHERE ResName = \"Subway\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the rating of the restaurant Subway?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2823, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all restaurant types.", "output": "SELECT ResTypeName FROM Restaurant_Type;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all restaurant types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2824, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description of the restaurant type Sandwich?", "output": "SELECT ResTypeDescription FROM Restaurant_Type WHERE ResTypeName = \"Sandwich\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description of the restaurant type Sandwich?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2825, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which restaurants have highest rating? List the restaurant name and its rating.", "output": "SELECT ResName , Rating FROM Restaurant ORDER BY Rating DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which restaurants have highest rating? List the restaurant name and its rating.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2826, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the age of student Linda Smith?", "output": "SELECT Age FROM Student WHERE Fname = \"Linda\" AND Lname = \"Smith\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the age of student Linda Smith?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2827, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the gender of the student Linda Smith?", "output": "SELECT Sex FROM Student WHERE Fname = \"Linda\" AND Lname = \"Smith\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the gender of the student Linda Smith?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2828, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all students' first names and last names who majored in 600.", "output": "SELECT Fname , Lname FROM Student WHERE Major = 600;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all students' first names and last names who majored in 600.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2829, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which city does student Linda Smith live in?", "output": "SELECT city_code FROM Student WHERE Fname = \"Linda\" AND Lname = \"Smith\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which city does student Linda Smith live in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2830, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Advisor 1121 has how many students?", "output": "SELECT count(*) FROM Student WHERE Advisor = 1121;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Advisor 1121 has how many students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2831, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which Advisor has most of students? List advisor and the number of students.", "output": "SELECT Advisor , count(*) FROM Student GROUP BY Advisor ORDER BY count(Advisor) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which Advisor has most of students? List advisor and the number of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2832, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which major has least number of students? List the major and the number of students.", "output": "SELECT Major , count(*) FROM Student GROUP BY Major ORDER BY count(Major) ASC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which major has least number of students? List the major and the number of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2833, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which major has between 2 and 30 number of students? List major and the number of students.", "output": "SELECT Major , count(*) FROM Student GROUP BY Major HAVING count(Major) BETWEEN 2 AND 30;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which major has between 2 and 30 number of students? List major and the number of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2834, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which student's age is older than 18 and is majoring in 600? List each student's first and last name.", "output": "SELECT Fname , Lname FROM Student WHERE Age > 18 AND Major = 600;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which student's age is older than 18 and is majoring in 600? List each student's first and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2835, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all female students age is older than 18 who is not majoring in 600. List students' first name and last name.", "output": "SELECT Fname , Lname FROM Student WHERE Age > 18 AND Major != 600 AND Sex = 'F';", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all female students age is older than 18 who is not majoring in 600. List students' first name and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2836, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many restaurant is the Sandwich type restaurant?", "output": "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'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many restaurant is the Sandwich type restaurant?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2837, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How long does student Linda Smith spend on the restaurant in total?", "output": "SELECT sum(Spent) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID WHERE Student.Fname = \"Linda\" AND Student.Lname = \"Smith\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How long does student Linda Smith spend on the restaurant in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2838, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many times has the student Linda Smith visited Subway?", "output": "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\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many times has the student Linda Smith visited Subway?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2839, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When did Linda Smith visit Subway?", "output": "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\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When did Linda Smith visit Subway?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2840, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.", "output": "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;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "restaurant_1", "id": 2841, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which student visited restaurant most often? List student's first name and last name.", "output": "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;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which student visited restaurant most often? List student's first name and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_deliveries", "id": 2842, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the ids of orders whose status is 'Success'.", "output": "SELECT actual_order_id FROM actual_orders WHERE order_status_code = 'Success'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the ids of orders whose status is 'Success'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_deliveries", "id": 2843, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and price of the product that has been ordered the greatest number of times.", "output": "SELECT t1.product_name , t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and price of the product that has been ordered the greatest number of times.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_deliveries", "id": 2844, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of customers in total.", "output": "SELECT count(*) FROM customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of customers in total.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_deliveries", "id": 2845, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different payment methods are there?", "output": "SELECT count(DISTINCT payment_method) FROM customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different payment methods are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_deliveries", "id": 2846, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the details of all trucks in the order of their license number.", "output": "SELECT truck_details FROM trucks ORDER BY truck_licence_number", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the details of all trucks in the order of their license number.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_deliveries", "id": 2847, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the most expensive product.", "output": "SELECT product_name FROM products ORDER BY product_price DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the most expensive product.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_deliveries", "id": 2848, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of customers who are not living in the state of California.", "output": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of customers who are not living in the state of California.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_deliveries", "id": 2849, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names and emails of customers who payed by Visa card.", "output": "SELECT customer_email , customer_name FROM customers WHERE payment_method = 'Visa'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names and emails of customers who payed by Visa card.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_deliveries", "id": 2850, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names and phone numbers of customers living in California state.", "output": "SELECT t1.customer_name , t1.customer_phone FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names and phone numbers of customers living in California state.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_deliveries", "id": 2851, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the states which do not have any employee in their record.", "output": "SELECT state_province_county FROM addresses WHERE address_id NOT IN (SELECT employee_address_id FROM Employees)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the states which do not have any employee in their record.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_deliveries", "id": 2852, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names, phone numbers, and emails of all customers sorted by their dates of becoming customers.", "output": "SELECT customer_name , customer_phone , customer_email FROM Customers ORDER BY date_became_customer", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names, phone numbers, and emails of all customers sorted by their dates of becoming customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_deliveries", "id": 2853, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the first 5 customers.", "output": "SELECT customer_name FROM Customers ORDER BY date_became_customer LIMIT 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the first 5 customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_deliveries", "id": 2854, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the payment method that is used most frequently.", "output": "SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the payment method that is used most frequently.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_deliveries", "id": 2855, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all routes in alphabetic order.", "output": "SELECT route_name FROM Delivery_Routes ORDER BY route_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of all routes in alphabetic order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_deliveries", "id": 2856, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of route that has the highest number of deliveries.", "output": "SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of route that has the highest number of deliveries.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_deliveries", "id": 2857, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the state names and the number of customers living in each state.", "output": "SELECT t2.state_province_county , count(*) FROM customer_addresses AS t1 JOIN addresses AS t2 ON t1.address_id = t2.address_id GROUP BY t2.state_province_county", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the state names and the number of customers living in each state.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2858, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many authors are there?", "output": "SELECT count(*) FROM authors", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: How many authors are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2859, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of authors.", "output": "SELECT count(*) FROM authors", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Count the number of authors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2860, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many institutions are there?", "output": "SELECT count(*) FROM inst", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: How many institutions are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2861, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of institutions.", "output": "SELECT count(*) FROM inst", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Count the number of institutions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2862, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many papers are published in total?", "output": "SELECT count(*) FROM papers", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: How many papers are published in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2863, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of total papers.", "output": "SELECT count(*) FROM papers", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Count the number of total papers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2864, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of papers published by \"Jeremy Gibbons\"?", "output": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Jeremy\" AND t1.lname = \"Gibbons\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: What are the titles of papers published by \"Jeremy Gibbons\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2865, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the titles of all the papers written by \"Jeremy Gibbons\"", "output": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Jeremy\" AND t1.lname = \"Gibbons\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find the titles of all the papers written by \"Jeremy Gibbons\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2866, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the papers published by \"Aaron Turon\".", "output": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Aaron\" AND t1.lname = \"Turon\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find all the papers published by \"Aaron Turon\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2867, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the titles of all the papers written by \"Aaron Turon\".", "output": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Aaron\" AND t1.lname = \"Turon\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find the titles of all the papers written by \"Aaron Turon\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2868, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many papers have \"Atsushi Ohori\" published?", "output": "SELECT count(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Atsushi\" AND t1.lname = \"Ohori\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: How many papers have \"Atsushi Ohori\" published?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2869, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many papers are \"Atsushi Ohori\" the author of?", "output": "SELECT count(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Atsushi\" AND t1.lname = \"Ohori\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: How many papers are \"Atsushi Ohori\" the author of?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2870, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the institution that \"Matthias Blume\" belongs to?", "output": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = \"Matthias\" AND t1.lname = \"Blume\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: What is the name of the institution that \"Matthias Blume\" belongs to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2871, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which institution is the author \"Matthias Blume\" belong to? Give me the name of the institution.", "output": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = \"Matthias\" AND t1.lname = \"Blume\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Which institution is the author \"Matthias Blume\" belong to? Give me the name of the institution.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2872, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which institution does \"Katsuhiro Ueno\" belong to?", "output": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = \"Katsuhiro\" AND t1.lname = \"Ueno\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Which institution does \"Katsuhiro Ueno\" belong to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2873, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the institution the author \"Katsuhiro Ueno\" belongs to?", "output": "SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = \"Katsuhiro\" AND t1.lname = \"Ueno\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: What is the name of the institution the author \"Katsuhiro Ueno\" belongs to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2874, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who belong to the institution \"University of Oxford\"? Show the first names and last names.", "output": "SELECT DISTINCT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"University of Oxford\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Who belong to the institution \"University of Oxford\"? Show the first names and last names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2875, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names and last names of the authors whose institution affiliation is \"University of Oxford\".", "output": "SELECT DISTINCT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"University of Oxford\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find the first names and last names of the authors whose institution affiliation is \"University of Oxford\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2876, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which authors belong to the institution \"Google\"? Show the first names and last names.", "output": "SELECT DISTINCT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Google\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Which authors belong to the institution \"Google\"? Show the first names and last names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2877, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names and last names of the authors whose institution affiliation is \"Google\".", "output": "SELECT DISTINCT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Google\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find the first names and last names of the authors whose institution affiliation is \"Google\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2878, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the last names of the author of the paper titled \"Binders Unbound\"?", "output": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = \"Binders Unbound\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: What are the last names of the author of the paper titled \"Binders Unbound\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2879, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the author of the paper titled \"Binders Unbound\"? Give me the last name.", "output": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = \"Binders Unbound\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Who is the author of the paper titled \"Binders Unbound\"? Give me the last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2880, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first and last name of the author(s) who wrote the paper \"Nameless, Painless\".", "output": "SELECT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = \"Nameless , Painless\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find the first and last name of the author(s) who wrote the paper \"Nameless, Painless\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2881, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last name of the author who published the paper titled \"Nameless, Painless\"?", "output": "SELECT t1.fname , t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title = \"Nameless , Painless\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: What are the first and last name of the author who published the paper titled \"Nameless, Painless\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2882, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the papers published under the institution \"Indiana University\"?", "output": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Indiana University\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: What are the papers published under the institution \"Indiana University\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2883, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the titles of the papers whose authors are from the institution \"Indiana University\".", "output": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Indiana University\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: List the titles of the papers whose authors are from the institution \"Indiana University\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2884, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the papers published by the institution \"Google\".", "output": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Google\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find all the papers published by the institution \"Google\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2885, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which papers were written by authors from the institution \"Google\"?", "output": "SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Google\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Which papers were written by authors from the institution \"Google\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2886, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many papers are published by the institution \"Tokohu University\"?", "output": "SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Tokohu University\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: How many papers are published by the institution \"Tokohu University\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2887, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of papers published by authors from the institution \"Tokohu University\".", "output": "SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"Tokohu University\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find the number of papers published by authors from the institution \"Tokohu University\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2888, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of papers published by the institution \"University of Pennsylvania\".", "output": "SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"University of Pennsylvania\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find the number of papers published by the institution \"University of Pennsylvania\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2889, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many papers are written by authors from the institution \"University of Pennsylvania\"?", "output": "SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = \"University of Pennsylvania\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: How many papers are written by authors from the institution \"University of Pennsylvania\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2890, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the papers which have \"Olin Shivers\" as an author.", "output": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Olin\" AND t1.lname = \"Shivers\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find the papers which have \"Olin Shivers\" as an author.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2891, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which papers did the author \"Olin Shivers\" write? Give me the paper titles.", "output": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Olin\" AND t1.lname = \"Shivers\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Which papers did the author \"Olin Shivers\" write? Give me the paper titles.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2892, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which papers have \"Stephanie Weirich\" as an author?", "output": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Stephanie\" AND t1.lname = \"Weirich\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Which papers have \"Stephanie Weirich\" as an author?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2893, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the titles of the papers the author \"Stephanie Weirich\" wrote.", "output": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = \"Stephanie\" AND t1.lname = \"Weirich\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find the titles of the papers the author \"Stephanie Weirich\" wrote.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2894, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which paper is published in an institution in \"USA\" and have \"Turon\" as its second author?", "output": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = \"USA\" AND t2.authorder = 2 AND t1.lname = \"Turon\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Which paper is published in an institution in \"USA\" and have \"Turon\" as its second author?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2895, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find papers whose second author has last name \"Turon\" and is affiliated with an institution in the country \"USA\".", "output": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = \"USA\" AND t2.authorder = 2 AND t1.lname = \"Turon\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find papers whose second author has last name \"Turon\" and is affiliated with an institution in the country \"USA\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2896, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the titles of papers whose first author is affiliated with an institution in the country \"Japan\" and has last name \"Ohori\"?", "output": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = \"Japan\" AND t2.authorder = 1 AND t1.lname = \"Ohori\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find the titles of papers whose first author is affiliated with an institution in the country \"Japan\" and has last name \"Ohori\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2897, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = \"Japan\" AND t2.authorder = 1 AND t1.lname = \"Ohori\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2898, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last name of the author that has published the most papers?", "output": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname , t1.lname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: What is the last name of the author that has published the most papers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2899, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which author has written the most papers? Find his or her last name.", "output": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.fname , t1.lname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Which author has written the most papers? Find his or her last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2900, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Retrieve the country that has published the most papers.", "output": "SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Retrieve the country that has published the most papers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2901, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the country that the most papers are affiliated with.", "output": "SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find the country that the most papers are affiliated with.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2902, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the organization that has published the largest number of papers.", "output": "SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find the name of the organization that has published the largest number of papers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2903, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which institution has the most papers? Find the name of the institution.", "output": "SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Which institution has the most papers? Find the name of the institution.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2904, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the titles of the papers that contain the word \"ML\".", "output": "SELECT title FROM papers WHERE title LIKE \"%ML%\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find the titles of the papers that contain the word \"ML\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2905, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which papers have the substring \"ML\" in their titles? Return the titles of the papers.", "output": "SELECT title FROM papers WHERE title LIKE \"%ML%\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Which papers have the substring \"ML\" in their titles? Return the titles of the papers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2906, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which paper's title contains the word \"Database\"?", "output": "SELECT title FROM papers WHERE title LIKE \"%Database%\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Which paper's title contains the word \"Database\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2907, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which papers have the substring \"Database\" in their titles? Show the titles of the papers.", "output": "SELECT title FROM papers WHERE title LIKE \"%Database%\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Which papers have the substring \"Database\" in their titles? Show the titles of the papers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2908, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of all the authors who have written a paper with title containing the word \"Functional\".", "output": "SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE \"%Functional%\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find the first names of all the authors who have written a paper with title containing the word \"Functional\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2909, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who has written a paper that has the word \"Functional\" in its title? Return the first names of the authors.", "output": "SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE \"%Functional%\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Who has written a paper that has the word \"Functional\" in its title? Return the first names of the authors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2910, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last names of all the authors that have written a paper with title containing the word \"Monadic\".", "output": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE \"%Monadic%\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find the last names of all the authors that have written a paper with title containing the word \"Monadic\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2911, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which authors have written a paper with title containing the word \"Monadic\"? Return their last names.", "output": "SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE \"%Monadic%\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Which authors have written a paper with title containing the word \"Monadic\"? Return their last names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2912, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Retrieve the title of the paper that has the largest number of authors.", "output": "SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT max(authorder) FROM authorship)", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Retrieve the title of the paper that has the largest number of authors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2913, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which paper has the most authors? Give me the paper title.", "output": "SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT max(authorder) FROM authorship)", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Which paper has the most authors? Give me the paper title.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2914, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name of the author with last name \"Ueno\"?", "output": "SELECT fname FROM authors WHERE lname = \"Ueno\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: What is the first name of the author with last name \"Ueno\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2915, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which authors have last name \"Ueno\"? List their first names.", "output": "SELECT fname FROM authors WHERE lname = \"Ueno\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Which authors have last name \"Ueno\"? List their first names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2916, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last name of the author with first name \"Amal\".", "output": "SELECT lname FROM authors WHERE fname = \"Amal\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find the last name of the author with first name \"Amal\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2917, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which authors have first name \"Amal\"? List their last names.", "output": "SELECT lname FROM authors WHERE fname = \"Amal\"", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Which authors have first name \"Amal\"? List their last names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2918, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of all the authors ordered in alphabetical order.", "output": "SELECT fname FROM authors ORDER BY fname", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Find the first names of all the authors ordered in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2919, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Sort the first names of all the authors in alphabetical order.", "output": "SELECT fname FROM authors ORDER BY fname", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Sort the first names of all the authors in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2920, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Retrieve all the last names of authors in alphabetical order.", "output": "SELECT lname FROM authors ORDER BY lname", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Retrieve all the last names of authors in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2921, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me a list of all the last names of authors sorted in alphabetical order", "output": "SELECT lname FROM authors ORDER BY lname", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Give me a list of all the last names of authors sorted in alphabetical order,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2922, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Retrieve all the first and last names of authors in the alphabetical order of last names.", "output": "SELECT fname , lname FROM authors ORDER BY lname", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Retrieve all the first and last names of authors in the alphabetical order of last names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "icfp_1", "id": 2923, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Sort the list of all the first and last names of authors in alphabetical order of the last names.", "output": "SELECT fname , lname FROM authors ORDER BY lname", "input": "Based on \n# the table&column(database schema) information {'Inst': ['instID', 'name', 'country'], 'Authors': ['authID', 'lname', 'fname'], 'Papers': ['paperID', 'title'], 'Authorship': ['authID', 'instID', 'paperID', 'authOrder']} and \n# the user question: Sort the list of all the first and last names of authors in alphabetical order of the last names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2924, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different last names do the actors and actresses have?", "output": "SELECT count(DISTINCT last_name) FROM actor", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different last names do the actors and actresses have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2925, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different last names actors have.", "output": "SELECT count(DISTINCT last_name) FROM actor", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of different last names actors have.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2926, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most popular first name of the actors?", "output": "SELECT first_name FROM actor GROUP BY first_name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most popular first name of the actors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2927, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the most common first name among all actors.", "output": "SELECT first_name FROM actor GROUP BY first_name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the most common first name among all actors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2928, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most popular full name of the actors?", "output": "SELECT first_name , last_name FROM actor GROUP BY first_name , last_name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most popular full name of the actors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2929, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the most common full name among all actors.", "output": "SELECT first_name , last_name FROM actor GROUP BY first_name , last_name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the most common full name among all actors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2930, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which districts have at least two addresses?", "output": "SELECT district FROM address GROUP BY district HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which districts have at least two addresses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2931, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the districts which have two or more addresses.", "output": "SELECT district FROM address GROUP BY district HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the districts which have two or more addresses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2932, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the phone number and postal code of the address 1031 Daugavpils Parkway?", "output": "SELECT phone , postal_code FROM address WHERE address = '1031 Daugavpils Parkway'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the phone number and postal code of the address 1031 Daugavpils Parkway?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2933, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the phone and postal code corresponding to the address '1031 Daugavpils Parkway'.", "output": "SELECT phone , postal_code FROM address WHERE address = '1031 Daugavpils Parkway'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the phone and postal code corresponding to the address '1031 Daugavpils Parkway'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2934, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which city has the most addresses? List the city name, number of addresses, and city id.", "output": "SELECT T2.city , count(*) , T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which city has the most addresses? List the city name, number of addresses, and city id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2935, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the city name, id, and number of addresses corresponding to the city with the most addressed?", "output": "SELECT T2.city , count(*) , T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the city name, id, and number of addresses corresponding to the city with the most addressed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2936, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many addresses are in the district of California?", "output": "SELECT count(*) FROM address WHERE district = 'California'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many addresses are in the district of California?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2937, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of addressed in the California district.", "output": "SELECT count(*) FROM address WHERE district = 'California'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of addressed in the California district.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2938, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which film is rented at a fee of 0.99 and has less than 3 in the inventory? List the film title and id.", "output": "SELECT title , film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title , T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id HAVING count(*) < 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which film is rented at a fee of 0.99 and has less than 3 in the inventory? List the film title and id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2939, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the title and id of the film which has a rental rate of 0.99 and an inventory of below 3?", "output": "SELECT title , film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title , T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id HAVING count(*) < 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the title and id of the film which has a rental rate of 0.99 and an inventory of below 3?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2940, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many cities are in Australia?", "output": "SELECT count(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many cities are in Australia?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2941, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of cities in Australia.", "output": "SELECT count(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of cities in Australia.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2942, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which countries have at least 3 cities?", "output": "SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id HAVING count(*) >= 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which countries have at least 3 cities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2943, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the countries that contain 3 or more cities?", "output": "SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id HAVING count(*) >= 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the countries that contain 3 or more cities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2944, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2945, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2946, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers have an active value of 1?", "output": "SELECT count(*) FROM customer WHERE active = '1'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers have an active value of 1?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2947, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of customers who are active.", "output": "SELECT count(*) FROM customer WHERE active = '1'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of customers who are active.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2948, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which film has the highest rental rate? And what is the rate?", "output": "SELECT title , rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which film has the highest rental rate? And what is the rate?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2949, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the title and rental rate of the film with the highest rental rate?", "output": "SELECT title , rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the title and rental rate of the film with the highest rental rate?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2950, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which film has the most number of actors or actresses? List the film name, film id and description.", "output": "SELECT T2.title , T2.film_id , T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which film has the most number of actors or actresses? List the film name, film id and description.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2951, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the title, id, and description of the movie with the greatest number of actors?", "output": "SELECT T2.title , T2.film_id , T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the title, id, and description of the movie with the greatest number of actors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2952, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which film actor (actress) starred the most films? List his or her first name, last name and actor id.", "output": "SELECT T2.first_name , T2.last_name , T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which film actor (actress) starred the most films? List his or her first name, last name and actor id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2953, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the full name and id of the actor or actress who starred in the greatest number of films.", "output": "SELECT T2.first_name , T2.last_name , T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the full name and id of the actor or actress who starred in the greatest number of films.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2954, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.", "output": "SELECT T2.first_name , T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING count(*) > 30", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2955, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names of actors who had roles in more than 30 films?", "output": "SELECT T2.first_name , T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING count(*) > 30", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full names of actors who had roles in more than 30 films?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2956, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which store owns most items?", "output": "SELECT store_id FROM inventory GROUP BY store_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which store owns most items?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2957, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the store that has the most items in inventory?", "output": "SELECT store_id FROM inventory GROUP BY store_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the store that has the most items in inventory?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2958, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total amount of all payments?", "output": "SELECT sum(amount) FROM payment", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total amount of all payments?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2959, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the sum of all payment amounts.", "output": "SELECT sum(amount) FROM payment", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the sum of all payment amounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2960, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T1.first_name , T1.last_name , T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY sum(amount) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2961, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the full name and id of the customer who has the lowest total amount of payment?", "output": "SELECT T1.first_name , T1.last_name , T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY sum(amount) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the full name and id of the customer who has the lowest total amount of payment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2962, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the genre name of the film HUNGER ROOF?", "output": "SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the genre name of the film HUNGER ROOF?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2963, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name of the category to which the film 'HUNGER ROOF' belongs.", "output": "SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the name of the category to which the film 'HUNGER ROOF' belongs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2964, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many films are there in each category? List the genre name, genre id and the count.", "output": "SELECT T2.name , T1.category_id , count(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many films are there in each category? List the genre name, genre id and the count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2965, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and ids of the different categories, and how many films are in each?", "output": "SELECT T2.name , T1.category_id , count(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and ids of the different categories, and how many films are in each?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2966, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which film has the most copies in the inventory? List both title and id.", "output": "SELECT T1.title , T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which film has the most copies in the inventory? List both title and id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2967, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the title and id of the film that has the greatest number of copies in inventory?", "output": "SELECT T1.title , T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the title and id of the film that has the greatest number of copies in inventory?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2968, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the film title and inventory id of the item in the inventory which was rented most frequently?", "output": "SELECT T1.title , T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T2.inventory_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the film title and inventory id of the item in the inventory which was rented most frequently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2969, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the title and inventory id of the film that is rented most often.", "output": "SELECT T1.title , T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T2.inventory_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the title and inventory id of the film that is rented most often.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2970, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many languages are in these films?", "output": "SELECT count(DISTINCT language_id) FROM film", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many languages are in these films?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2971, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different languages in these films.", "output": "SELECT count(DISTINCT language_id) FROM film", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of different languages in these films.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2972, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the movies rated as R? List the titles.", "output": "SELECT title FROM film WHERE rating = 'R'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the movies rated as R? List the titles.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2973, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the titles of any movies with an R rating.", "output": "SELECT title FROM film WHERE rating = 'R'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the titles of any movies with an R rating.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2974, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Where is store 1 located?", "output": "SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Where is store 1 located?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2975, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the address of store 1.", "output": "SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the address of store 1.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2976, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which staff handled least number of payments? List the full name and the id.", "output": "SELECT T1.first_name , T1.last_name , T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which staff handled least number of payments? List the full name and the id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2977, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the full name and staff id of the staff who has handled the fewest payments.", "output": "SELECT T1.first_name , T1.last_name , T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the full name and staff id of the staff who has handled the fewest payments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2978, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which language does the film AIRPORT POLLOCK use? List the language name.", "output": "SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which language does the film AIRPORT POLLOCK use? List the language name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2979, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the language that the film 'AIRPORT POLLOCK' is in?", "output": "SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the language that the film 'AIRPORT POLLOCK' is in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2980, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many stores are there?", "output": "SELECT count(*) FROM store", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many stores are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2981, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of stores.", "output": "SELECT count(*) FROM store", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of stores.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2982, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many kinds of different ratings are listed?", "output": "SELECT count(DISTINCT rating) FROM film", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many kinds of different ratings are listed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2983, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different film ratings.", "output": "SELECT count(DISTINCT rating) FROM film", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of different film ratings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2984, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which movies have 'Deleted Scenes' as a substring in the special feature?", "output": "SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which movies have 'Deleted Scenes' as a substring in the special feature?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2985, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the titles of films that include 'Deleted Scenes' in their special feature section.", "output": "SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the titles of films that include 'Deleted Scenes' in their special feature section.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2986, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many items in inventory does store 1 have?", "output": "SELECT count(*) FROM inventory WHERE store_id = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many items in inventory does store 1 have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2987, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of items store 1 has in stock.", "output": "SELECT count(*) FROM inventory WHERE store_id = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of items store 1 has in stock.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2988, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When did the first payment happen?", "output": "SELECT payment_date FROM payment ORDER BY payment_date ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When did the first payment happen?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2989, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What was the date of the earliest payment?", "output": "SELECT payment_date FROM payment ORDER BY payment_date ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What was the date of the earliest payment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2990, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Where does the customer with the first name Linda live? And what is her email?", "output": "SELECT T2.address , T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Where does the customer with the first name Linda live? And what is her email?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2991, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the address and email of the customer with the first name Linda.", "output": "SELECT T2.address , T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the address and email of the customer with the first name Linda.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2992, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the films longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles.", "output": "SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the films longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2993, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2994, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name and the last name of the customer who made the earliest rental?", "output": "SELECT T1.first_name , T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name and the last name of the customer who made the earliest rental?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2995, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the full name of the customer who made the first rental.", "output": "SELECT T1.first_name , T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the full name of the customer who made the first rental.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2996, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT DISTINCT T1.first_name , T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2997, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT DISTINCT T1.first_name , T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2998, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which store has most the customers?", "output": "SELECT store_id FROM customer GROUP BY store_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which store has most the customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 2999, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the id of the store with the most customers.", "output": "SELECT store_id FROM customer GROUP BY store_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the id of the store with the most customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 3000, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the largest payment amount?", "output": "SELECT amount FROM payment ORDER BY amount DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the largest payment amount?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 3001, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the amount of the largest payment.", "output": "SELECT amount FROM payment ORDER BY amount DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the amount of the largest payment.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 3002, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Where does the staff member with the first name Elsa live?", "output": "SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Where does the staff member with the first name Elsa live?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 3003, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the address of the staff member who has the first name Elsa.", "output": "SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE T1.first_name = 'Elsa'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the address of the staff member who has the first name Elsa.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 3004, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'?", "output": "SELECT first_name FROM customer WHERE customer_id NOT IN( SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01' )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sakila_1", "id": 3005, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the first names of customers who did not rented a film after the date '2005-08-23 02:06:01'.", "output": "SELECT first_name FROM customer WHERE customer_id NOT IN( SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01' )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the first names of customers who did not rented a film after the date '2005-08-23 02:06:01'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3006, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many bank branches are there?", "output": "SELECT count(*) FROM bank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many bank branches are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3007, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of bank branches.", "output": "SELECT count(*) FROM bank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of bank branches.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3008, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers are there?", "output": "SELECT sum(no_of_customers) FROM bank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3009, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of customers across banks?", "output": "SELECT sum(no_of_customers) FROM bank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of customers across banks?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3010, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of customers in the banks at New York City.", "output": "SELECT sum(no_of_customers) FROM bank WHERE city = 'New York City'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of customers in the banks at New York City.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3011, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of customers who use banks in New York City?", "output": "SELECT sum(no_of_customers) FROM bank WHERE city = 'New York City'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of customers who use banks in New York City?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3012, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average number of customers in all banks of Utah state.", "output": "SELECT avg(no_of_customers) FROM bank WHERE state = 'Utah'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average number of customers in all banks of Utah state.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3013, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of customers across banks in the state of Utah?", "output": "SELECT avg(no_of_customers) FROM bank WHERE state = 'Utah'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average number of customers across banks in the state of Utah?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3014, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average number of customers cross all banks.", "output": "SELECT avg(no_of_customers) FROM bank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average number of customers cross all banks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3015, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of bank customers?", "output": "SELECT avg(no_of_customers) FROM bank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average number of bank customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3016, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the city and state of the bank branch named morningside.", "output": "SELECT city , state FROM bank WHERE bname = 'morningside'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the city and state of the bank branch named morningside.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3017, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What city and state is the bank with the name morningside in?", "output": "SELECT city , state FROM bank WHERE bname = 'morningside'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What city and state is the bank with the name morningside in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3018, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the branch names of banks in the New York state.", "output": "SELECT bname FROM bank WHERE state = 'New York'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the branch names of banks in the New York state.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3019, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of banks in the state of New York?", "output": "SELECT bname FROM bank WHERE state = 'New York'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of banks in the state of New York?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3020, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of all customers sorted by their account balance in ascending order.", "output": "SELECT cust_name FROM customer ORDER BY acc_bal", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of all customers sorted by their account balance in ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3021, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all customers, ordered by account balance?", "output": "SELECT cust_name FROM customer ORDER BY acc_bal", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all customers, ordered by account balance?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3022, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of all different customers who have some loan sorted by their total loan amount.", "output": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY sum(T2.amount)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of all different customers who have some loan sorted by their total loan amount.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3023, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the different customers who have taken out a loan, ordered by the total amount that they have taken?", "output": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY sum(T2.amount)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the different customers who have taken out a loan, ordered by the total amount that they have taken?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3024, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the state, account type, and credit score of the customer whose number of loan is 0.", "output": "SELECT state , acc_type , credit_score FROM customer WHERE no_of_loans = 0", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the state, account type, and credit score of the customer whose number of loan is 0.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3025, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the states, account types, and credit scores for customers who have 0 loans?", "output": "SELECT state , acc_type , credit_score FROM customer WHERE no_of_loans = 0", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the states, account types, and credit scores for customers who have 0 loans?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3026, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of different cities which banks are located at.", "output": "SELECT count(DISTINCT city) FROM bank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of different cities which banks are located at.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3027, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In how many different cities are banks located?", "output": "SELECT count(DISTINCT city) FROM bank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: In how many different cities are banks located?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3028, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of different states which banks are located at.", "output": "SELECT count(DISTINCT state) FROM bank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of different states which banks are located at.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3029, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In how many different states are banks located?", "output": "SELECT count(DISTINCT state) FROM bank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: In how many different states are banks located?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3030, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct types of accounts are there?", "output": "SELECT count(DISTINCT acc_type) FROM customer", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct types of accounts are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3031, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different account types.", "output": "SELECT count(DISTINCT acc_type) FROM customer", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of different account types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3032, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and account balance of the customer whose name includes the letter \u2018a\u2019.", "output": "SELECT cust_name , acc_bal FROM customer WHERE cust_name LIKE '%a%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and account balance of the customer whose name includes the letter \u2018a\u2019.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3033, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and account balances of customers with the letter a in their names?", "output": "SELECT cust_name , acc_bal FROM customer WHERE cust_name LIKE '%a%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and account balances of customers with the letter a in their names?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3034, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total account balance of each customer from Utah or Texas.", "output": "SELECT sum(acc_bal) FROM customer WHERE state = 'Utah' OR state = 'Texas'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total account balance of each customer from Utah or Texas.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3035, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the total account balances for each customer from Utah or Texas?", "output": "SELECT sum(acc_bal) FROM customer WHERE state = 'Utah' OR state = 'Texas'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the total account balances for each customer from Utah or Texas?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3036, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of customers who have both saving and checking account types.", "output": "SELECT cust_name FROM customer WHERE acc_type = 'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type = 'checking'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of customers who have both saving and checking account types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3037, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of customers who have both savings and checking accounts?", "output": "SELECT cust_name FROM customer WHERE acc_type = 'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type = 'checking'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of customers who have both savings and checking accounts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3038, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of customers who do not have an saving account.", "output": "SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of customers who do not have an saving account.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3039, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of customers who do not have saving accounts?", "output": "SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = 'saving'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of customers who do not have saving accounts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3040, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of customers who do not have a loan with a type of Mortgages.", "output": "SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE T2.loan_type = 'Mortgages'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of customers who do not have a loan with a type of Mortgages.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3041, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of customers who have not taken a Mortage loan?", "output": "SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE T2.loan_type = 'Mortgages'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of customers who have not taken a Mortage loan?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3042, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of customers who have loans of both Mortgages and Auto.", "output": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Mortgages' INTERSECT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Auto'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of customers who have loans of both Mortgages and Auto.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3043, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of customers who have taken both Mortgage and Auto loans?", "output": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Mortgages' INTERSECT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE loan_type = 'Auto'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of customers who have taken both Mortgage and Auto loans?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3044, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of customers whose credit score is below the average credit scores of all customers.", "output": "SELECT cust_name FROM customer WHERE credit_score < (SELECT avg(credit_score) FROM customer)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of customers whose credit score is below the average credit scores of all customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3045, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of customers with credit score less than the average credit score across customers?", "output": "SELECT cust_name FROM customer WHERE credit_score < (SELECT avg(credit_score) FROM customer)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of customers with credit score less than the average credit score across customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3046, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the branch name of the bank that has the most number of customers.", "output": "SELECT bname FROM bank ORDER BY no_of_customers DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the branch name of the bank that has the most number of customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3047, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the bank branch with the greatest number of customers?", "output": "SELECT bname FROM bank ORDER BY no_of_customers DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the bank branch with the greatest number of customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3048, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of customer who has the lowest credit score.", "output": "SELECT cust_name FROM customer ORDER BY credit_score LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of customer who has the lowest credit score.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3049, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the customer with the worst credit score?", "output": "SELECT cust_name FROM customer ORDER BY credit_score LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the customer with the worst credit score?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3050, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name, account type, and account balance of the customer who has the highest credit score.", "output": "SELECT cust_name , acc_type , acc_bal FROM customer ORDER BY credit_score DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name, account type, and account balance of the customer who has the highest credit score.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3051, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name, account type, and account balance corresponding to the customer with the highest credit score?", "output": "SELECT cust_name , acc_type , acc_bal FROM customer ORDER BY credit_score DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name, account type, and account balance corresponding to the customer with the highest credit score?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3052, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of customer who has the highest amount of loans.", "output": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY sum(T2.amount) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of customer who has the highest amount of loans.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3053, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the customer who has greatest total loan amount?", "output": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY sum(T2.amount) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the customer who has greatest total loan amount?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3054, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the state which has the most number of customers.", "output": "SELECT state FROM bank GROUP BY state ORDER BY sum(no_of_customers) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the state which has the most number of customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3055, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which state has the greatest total number of bank customers?", "output": "SELECT state FROM bank GROUP BY state ORDER BY sum(no_of_customers) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which state has the greatest total number of bank customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3056, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each account type, find the average account balance of customers with credit score lower than 50.", "output": "SELECT avg(acc_bal) , acc_type FROM customer WHERE credit_score < 50 GROUP BY acc_type", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each account type, find the average account balance of customers with credit score lower than 50.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3057, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average account balance of customers with credit score below 50 for the different account types?", "output": "SELECT avg(acc_bal) , acc_type FROM customer WHERE credit_score < 50 GROUP BY acc_type", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average account balance of customers with credit score below 50 for the different account types?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3058, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each state, find the total account balance of customers whose credit score is above 100.", "output": "SELECT sum(acc_bal) , state FROM customer WHERE credit_score > 100 GROUP BY state", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each state, find the total account balance of customers whose credit score is above 100.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3059, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total account balance for customers with a credit score of above 100 for the different states?", "output": "SELECT sum(acc_bal) , state FROM customer WHERE credit_score > 100 GROUP BY state", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total account balance for customers with a credit score of above 100 for the different states?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3060, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total amount of loans offered by each bank branch.", "output": "SELECT sum(amount) , T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total amount of loans offered by each bank branch.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3061, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the different bank branches, and what are their total loan amounts?", "output": "SELECT sum(amount) , T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the different bank branches, and what are their total loan amounts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3062, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of customers who have more than one loan.", "output": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of customers who have more than one loan.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3063, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of customers who have taken out more than one loan?", "output": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of customers who have taken out more than one loan?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3064, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and account balance of the customers who have loans with a total amount of more than 5000.", "output": "SELECT T1.cust_name , T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING sum(T2.amount) > 5000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and account balance of the customers who have loans with a total amount of more than 5000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3065, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and account balances for customers who have taken a total amount of more than 5000 in loans?", "output": "SELECT T1.cust_name , T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING sum(T2.amount) > 5000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and account balances for customers who have taken a total amount of more than 5000 in loans?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3066, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of bank branch that provided the greatest total amount of loans.", "output": "SELECT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname ORDER BY sum(T2.amount) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of bank branch that provided the greatest total amount of loans.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3067, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the bank branch that has lent the greatest amount?", "output": "SELECT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname ORDER BY sum(T2.amount) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the bank branch that has lent the greatest amount?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3068, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of bank branch that provided the greatest total amount of loans to customers with credit score is less than 100.", "output": "SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY sum(T1.amount) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of bank branch that provided the greatest total amount of loans to customers with credit score is less than 100.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3069, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY sum(T1.amount) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3070, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of bank branches that provided some loans.", "output": "SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of bank branches that provided some loans.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3071, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the different banks that have provided loans?", "output": "SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the different banks that have provided loans?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3072, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and credit score of the customers who have some loans.", "output": "SELECT DISTINCT T1.cust_name , T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and credit score of the customers who have some loans.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3073, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different names and credit scores of customers who have taken a loan?", "output": "SELECT DISTINCT T1.cust_name , T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different names and credit scores of customers who have taken a loan?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3074, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the the name of the customers who have a loan with amount more than 3000.", "output": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the the name of the customers who have a loan with amount more than 3000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3075, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of customers who have a loan of more than 3000 in amount?", "output": "SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of customers who have a loan of more than 3000 in amount?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3076, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the city and name of bank branches that provide business loans.", "output": "SELECT T1.bname , T1.city FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T2.loan_type = 'Business'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the city and name of bank branches that provide business loans.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3077, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and cities of bank branches that offer loans for business?", "output": "SELECT T1.bname , T1.city FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T2.loan_type = 'Business'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and cities of bank branches that offer loans for business?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3078, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of bank branches that have provided a loan to any customer whose credit score is below 100.", "output": "SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of bank branches that have provided a loan to any customer whose credit score is below 100.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3079, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of banks that have loaned money to customers with credit scores below 100?", "output": "SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of banks that have loaned money to customers with credit scores below 100?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3080, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total amount of loans provided by bank branches in the state of New York.", "output": "SELECT sum(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T1.state = 'New York'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total amount of loans provided by bank branches in the state of New York.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3081, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total amount of money loaned by banks in New York state?", "output": "SELECT sum(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T1.state = 'New York'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total amount of money loaned by banks in New York state?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3082, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average credit score of the customers who have some loan.", "output": "SELECT avg(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average credit score of the customers who have some loan.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3083, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average credit score for customers who have taken a loan?", "output": "SELECT avg(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average credit score for customers who have taken a loan?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3084, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average credit score of the customers who do not have any loan.", "output": "SELECT avg(credit_score) FROM customer WHERE cust_id NOT IN (SELECT cust_id FROM loan)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average credit score of the customers who do not have any loan.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "loan_1", "id": 3085, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average credit score for customers who have never taken a loan?", "output": "SELECT avg(credit_score) FROM customer WHERE cust_id NOT IN (SELECT cust_id FROM loan)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average credit score for customers who have never taken a loan?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3086, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many assessment notes are there in total?", "output": "SELECT count(*) FROM ASSESSMENT_NOTES", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many assessment notes are there in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3087, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the dates of the assessment notes?", "output": "SELECT date_of_notes FROM Assessment_Notes", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the dates of the assessment notes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3088, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many addresses have zip code 197?", "output": "SELECT count(*) FROM ADDRESSES WHERE zip_postcode = \"197\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many addresses have zip code 197?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3089, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct incident type codes are there?", "output": "SELECT count(DISTINCT incident_type_code) FROM Behavior_Incident", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct incident type codes are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3090, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return all distinct detention type codes.", "output": "SELECT DISTINCT detention_type_code FROM Detention", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return all distinct detention type codes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3091, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the start and end dates for incidents with incident type code \"NOISE\"?", "output": "SELECT date_incident_start , date_incident_end FROM Behavior_Incident WHERE incident_type_code = \"NOISE\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the start and end dates for incidents with incident type code \"NOISE\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3092, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return all detention summaries.", "output": "SELECT detention_summary FROM Detention", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return all detention summaries.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3093, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the cell phone number and email address for all students.", "output": "SELECT cell_mobile_number , email_address FROM STUDENTS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the cell phone number and email address for all students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3094, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the email of the student with first name \"Emma\" and last name \"Rohan\"?", "output": "SELECT email_address FROM Students WHERE first_name = \"Emma\" AND last_name = \"Rohan\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the email of the student with first name \"Emma\" and last name \"Rohan\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3095, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct students have been in detention?", "output": "SELECT count(DISTINCT student_id) FROM Students_in_Detention", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct students have been in detention?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3096, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the gender of the teacher with last name \"Medhurst\"?", "output": "SELECT gender FROM TEACHERS WHERE last_name = \"Medhurst\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the gender of the teacher with last name \"Medhurst\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3097, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the incident type description for the incident type with code \"VIOLENCE\"?", "output": "SELECT incident_type_description FROM Ref_Incident_Type WHERE incident_type_code = \"VIOLENCE\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the incident type description for the incident type with code \"VIOLENCE\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3098, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the maximum and minimum monthly rental for all student addresses.", "output": "SELECT max(monthly_rental) , min(monthly_rental) FROM Student_Addresses", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the maximum and minimum monthly rental for all student addresses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3099, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of teachers whose email address contains the word \"man\".", "output": "SELECT first_name FROM Teachers WHERE email_address LIKE '%man%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names of teachers whose email address contains the word \"man\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3100, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all information about the assessment notes sorted by date in ascending order.", "output": "SELECT * FROM Assessment_Notes ORDER BY date_of_notes ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all information about the assessment notes sorted by date in ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3101, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all cities of addresses in alphabetical order.", "output": "SELECT city FROM Addresses ORDER BY city", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all cities of addresses in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3102, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names and last names of teachers in alphabetical order of last name.", "output": "SELECT first_name , last_name FROM Teachers ORDER BY last_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names and last names of teachers in alphabetical order of last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3103, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all information about student addresses, and sort by monthly rental in descending order.", "output": "SELECT * FROM Student_Addresses ORDER BY monthly_rental DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all information about student addresses, and sort by monthly rental in descending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3104, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id and first name of the student that has the most number of assessment notes?", "output": "SELECT T1.student_id , T2.first_name FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id and first name of the student that has the most number of assessment notes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3105, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the ids and first names of the 3 teachers that have the most number of assessment notes?", "output": "SELECT T1.teacher_id , T2.first_name FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the ids and first names of the 3 teachers that have the most number of assessment notes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3106, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id and last name of the student that has the most behavior incidents?", "output": "SELECT T1.student_id , T2.last_name FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id and last name of the student that has the most behavior incidents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3107, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id and last name of the teacher that has the most detentions with detention type code \"AFTER\"?", "output": "SELECT T1.teacher_id , T2.last_name FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T1.detention_type_code = \"AFTER\" GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id and last name of the teacher that has the most detentions with detention type code \"AFTER\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3108, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the id and first name of the student whose addresses have the highest average monthly rental?", "output": "SELECT T1.student_id , T2.first_name FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY AVG(monthly_rental) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the id and first name of the student whose addresses have the highest average monthly rental?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3109, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id and city of the student address with the highest average monthly rental.", "output": "SELECT T2.address_id , T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id ORDER BY AVG(monthly_rental) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id and city of the student address with the highest average monthly rental.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3110, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the code and description of the most frequent behavior incident type?", "output": "SELECT T1.incident_type_code , T2.incident_type_description FROM Behavior_Incident AS T1 JOIN Ref_Incident_Type AS T2 ON T1.incident_type_code = T2.incident_type_code GROUP BY T1.incident_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the code and description of the most frequent behavior incident type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3111, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the code and description of the least frequent detention type ?", "output": "SELECT T1.detention_type_code , T2.detention_type_description FROM Detention AS T1 JOIN Ref_Detention_Type AS T2 ON T1.detention_type_code = T2.detention_type_code GROUP BY T1.detention_type_code ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the code and description of the least frequent detention type ?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3112, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the dates of assessment notes for students with first name \"Fanny\".", "output": "SELECT T1.date_of_notes FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.first_name = \"Fanny\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the dates of assessment notes for students with first name \"Fanny\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3113, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the texts of assessment notes for teachers with last name \"Schuster\".", "output": "SELECT T1.text_of_notes FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = \"Schuster\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the texts of assessment notes for teachers with last name \"Schuster\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3114, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the start and end dates of behavior incidents of students with last name \"Fahey\".", "output": "SELECT T1.date_incident_start , date_incident_end FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.last_name = \"Fahey\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the start and end dates of behavior incidents of students with last name \"Fahey\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3115, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the start and end dates of detentions of teachers with last name \"Schultz\".", "output": "SELECT T1.datetime_detention_start , datetime_detention_end FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = \"Schultz\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the start and end dates of detentions of teachers with last name \"Schultz\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3116, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the id and zip code of the address with the highest monthly rental?", "output": "SELECT T2.address_id , T1.zip_postcode FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id ORDER BY monthly_rental DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the id and zip code of the address with the highest monthly rental?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3117, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the cell phone number of the student whose address has the lowest monthly rental?", "output": "SELECT T2.cell_mobile_number FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.monthly_rental ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the cell phone number of the student whose address has the lowest monthly rental?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3118, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the monthly rentals of student addresses in Texas state?", "output": "SELECT T2.monthly_rental FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id WHERE T1.state_province_county = \"Texas\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the monthly rentals of student addresses in Texas state?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3119, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names and last names of students with address in Wisconsin state?", "output": "SELECT T2.first_name , T2.last_name FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id WHERE T1.state_province_county = \"Wisconsin\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names and last names of students with address in Wisconsin state?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3120, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the line 1 and average monthly rentals of all student addresses?", "output": "SELECT T1.line_1 , avg(T2.monthly_rental) FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the line 1 and average monthly rentals of all student addresses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3121, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the zip code of the address where the teacher with first name \"Lyla\" lives?", "output": "SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = \"Lyla\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the zip code of the address where the teacher with first name \"Lyla\" lives?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3122, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the email addresses of teachers whose address has zip code \"918\"?", "output": "SELECT T2.email_address FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T1.zip_postcode = \"918\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the email addresses of teachers whose address has zip code \"918\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3123, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are not involved in any behavior incident?", "output": "SELECT count(*) FROM STUDENTS WHERE student_id NOT IN ( SELECT student_id FROM Behavior_Incident )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students are not involved in any behavior incident?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3124, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last names of teachers who are not involved in any detention.", "output": "SELECT last_name FROM Teachers EXCEPT SELECT T1.last_name FROM Teachers AS T1 JOIN Detention AS T2 ON T1.teacher_id = T2.teacher_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the last names of teachers who are not involved in any detention.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "behavior_monitoring", "id": 3125, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the line 1 of addresses shared by some students and some teachers?", "output": "SELECT T1.line_1 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id INTERSECT SELECT T1.line_1 FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the line 1 of addresses shared by some students and some teachers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3126, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which assets have 2 parts and have less than 2 fault logs? List the asset id and detail.", "output": "SELECT T1.asset_id , T1.asset_details FROM Assets AS T1 JOIN Asset_Parts AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id HAVING count(*) = 2 INTERSECT SELECT T1.asset_id , T1.asset_details FROM Assets AS T1 JOIN Fault_Log AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id HAVING count(*) < 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which assets have 2 parts and have less than 2 fault logs? List the asset id and detail.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3127, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many assets does each maintenance contract contain? List the number and the contract id.", "output": "SELECT count(*) , T1.maintenance_contract_id FROM Maintenance_Contracts AS T1 JOIN Assets AS T2 ON T1.maintenance_contract_id = T2.maintenance_contract_id GROUP BY T1.maintenance_contract_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many assets does each maintenance contract contain? List the number and the contract id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3128, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many assets does each third party company supply? List the count and the company id.", "output": "SELECT count(*) , T1.company_id FROM Third_Party_Companies AS T1 JOIN Assets AS T2 ON T1.company_id = T2.supplier_company_id GROUP BY T1.company_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many assets does each third party company supply? List the count and the company id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3129, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which third party companies have at least 2 maintenance engineers or have at least 2 maintenance contracts? List the company id and name.", "output": "SELECT T1.company_id , T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Engineers AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id HAVING count(*) >= 2 UNION SELECT T3.company_id , T3.company_name FROM Third_Party_Companies AS T3 JOIN Maintenance_Contracts AS T4 ON T3.company_id = T4.maintenance_contract_company_id GROUP BY T3.company_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which third party companies have at least 2 maintenance engineers or have at least 2 maintenance contracts? List the company id and name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3130, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and id of the staff who recorded the fault log but has not contacted any visiting engineers?", "output": "SELECT T1.staff_name , T1.staff_id FROM Staff AS T1 JOIN Fault_Log AS T2 ON T1.staff_id = T2.recorded_by_staff_id EXCEPT SELECT T3.staff_name , T3.staff_id FROM Staff AS T3 JOIN Engineer_Visits AS T4 ON T3.staff_id = T4.contact_staff_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and id of the staff who recorded the fault log but has not contacted any visiting engineers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3131, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which engineer has visited the most times? Show the engineer id, first name and last name.", "output": "SELECT T1.engineer_id , T1.first_name , T1.last_name FROM Maintenance_Engineers AS T1 JOIN Engineer_Visits AS T2 GROUP BY T1.engineer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which engineer has visited the most times? Show the engineer id, first name and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3132, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which parts have more than 2 faults? Show the part name and id.", "output": "SELECT T1.part_name , T1.part_id FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_id HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which parts have more than 2 faults? Show the part name and id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3133, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all every engineer's first name, last name, details and coresponding skill description.", "output": "SELECT T1.first_name , T1.last_name , T1.other_details , T3.skill_description FROM Maintenance_Engineers AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id = T2.engineer_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all every engineer's first name, last name, details and coresponding skill description.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3134, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T1.fault_short_name , T3.skill_description FROM Part_Faults AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id = T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3135, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many assets can each parts be used in? List the part name and the number.", "output": "SELECT T1.part_name , count(*) FROM Parts AS T1 JOIN Asset_Parts AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many assets can each parts be used in? List the part name and the number.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3136, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the fault descriptions and the fault status of all the faults recoreded in the logs?", "output": "SELECT T1.fault_description , T2.fault_status FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the fault descriptions and the fault status of all the faults recoreded in the logs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3137, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many engineer visits are required at most for a single fault log? List the number and the log entry id.", "output": "SELECT count(*) , T1.fault_log_entry_id FROM Fault_Log AS T1 JOIN Engineer_Visits AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many engineer visits are required at most for a single fault log? List the number and the log entry id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3138, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the distinct last names of all the engineers?", "output": "SELECT DISTINCT last_name FROM Maintenance_Engineers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the distinct last names of all the engineers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3139, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many fault status codes are recorded in the fault log parts table?", "output": "SELECT DISTINCT fault_status FROM Fault_Log_Parts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many fault status codes are recorded in the fault log parts table?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3140, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which engineers have never visited to maintain the assets? List the engineer first name and last name.", "output": "SELECT first_name , last_name FROM Maintenance_Engineers WHERE engineer_id NOT IN (SELECT engineer_id FROM Engineer_Visits)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which engineers have never visited to maintain the assets? List the engineer first name and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3141, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the asset id, details, make and model for every asset.", "output": "SELECT asset_id , asset_details , asset_make , asset_model FROM Assets", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the asset id, details, make and model for every asset.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3142, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When was the first asset acquired?", "output": "SELECT asset_acquired_date FROM Assets ORDER BY asset_acquired_date ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When was the first asset acquired?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3143, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which part fault requires the most number of skills to fix? List part id and name.", "output": "SELECT T1.part_id , T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id JOIN Skills_Required_To_Fix AS T3 ON T2.part_fault_id = T3.part_fault_id GROUP BY T1.part_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which part fault requires the most number of skills to fix? List part id and name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3144, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which kind of part has the least number of faults? List the part name.", "output": "SELECT T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which kind of part has the least number of faults? List the part name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3145, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Among those engineers who have visited, which engineer makes the least number of visits? List the engineer id, first name and last name.", "output": "SELECT T1.engineer_id , T1.first_name , T1.last_name FROM Maintenance_Engineers AS T1 JOIN Engineer_Visits AS T2 ON T1.engineer_id = T2.engineer_id GROUP BY T1.engineer_id ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Among those engineers who have visited, which engineer makes the least number of visits? List the engineer id, first name and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3146, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which staff have contacted which engineers? List the staff name and the engineer first name and last name.", "output": "SELECT T1.staff_name , T3.first_name , T3.last_name FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id JOIN Maintenance_Engineers AS T3 ON T2.engineer_id = T3.engineer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which staff have contacted which engineers? List the staff name and the engineer first name and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3147, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which fault log included the most number of faulty parts? List the fault log id, description and record time.", "output": "SELECT T1.fault_log_entry_id , T1.fault_description , T1.fault_log_entry_datetime FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which fault log included the most number of faulty parts? List the fault log id, description and record time.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3148, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which skill is used in fixing the most number of faults? List the skill id and description.", "output": "SELECT T1.skill_id , T1.skill_description FROM Skills AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.skill_id = T2.skill_id GROUP BY T1.skill_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which skill is used in fixing the most number of faults? List the skill id and description.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3149, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the distinct asset models?", "output": "SELECT DISTINCT asset_model FROM Assets", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the distinct asset models?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3150, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the all the assets make, model, details by the disposed date ascendingly.", "output": "SELECT asset_make , asset_model , asset_details FROM Assets ORDER BY asset_disposed_date ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the all the assets make, model, details by the disposed date ascendingly.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3151, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which part has the least chargeable amount? List the part id and amount.", "output": "SELECT part_id , chargeable_amount FROM Parts ORDER BY chargeable_amount ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which part has the least chargeable amount? List the part id and amount.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3152, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which company started the earliest the maintenance contract? Show the company name.", "output": "SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id = T2.maintenance_contract_company_id ORDER BY T2.contract_start_date ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which company started the earliest the maintenance contract? Show the company name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3153, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description of the type of the company who concluded its contracts most recently?", "output": "SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id = T2.maintenance_contract_company_id JOIN Ref_Company_Types AS T3 ON T1.company_type_code = T3.company_type_code ORDER BY T2.contract_end_date DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description of the type of the company who concluded its contracts most recently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3154, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which gender makes up the majority of the staff?", "output": "SELECT gender FROM staff GROUP BY gender ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which gender makes up the majority of the staff?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3155, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many engineers did each staff contact? List both the contact staff name and number of engineers contacted.", "output": "SELECT T1.staff_name , count(*) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id GROUP BY T1.staff_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many engineers did each staff contact? List both the contact staff name and number of engineers contacted.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "assets_maintenance", "id": 3156, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which assets did not incur any fault log? List the asset model.", "output": "SELECT asset_model FROM Assets WHERE asset_id NOT IN (SELECT asset_id FROM Fault_Log)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which assets did not incur any fault log? List the asset model.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "station_weather", "id": 3157, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "list the local authorities and services provided by all stations.", "output": "SELECT local_authority , services FROM station", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: list the local authorities and services provided by all stations.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "station_weather", "id": 3158, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "show all train numbers and names ordered by their time from early to late.", "output": "SELECT train_number , name FROM train ORDER BY TIME", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: show all train numbers and names ordered by their time from early to late.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "station_weather", "id": 3159, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the times and numbers of all trains that go to Chennai, ordered by time.", "output": "SELECT TIME , train_number FROM train WHERE destination = 'Chennai' ORDER BY TIME", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the times and numbers of all trains that go to Chennai, ordered by time.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "station_weather", "id": 3160, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many trains have 'Express' in their names?", "output": "SELECT count(*) FROM train WHERE name LIKE \"%Express%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many trains have 'Express' in their names?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "station_weather", "id": 3161, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number and time of the train that goes from Chennai to Guruvayur.", "output": "SELECT train_number , TIME FROM train WHERE origin = 'Chennai' AND destination = 'Guruvayur'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number and time of the train that goes from Chennai to Guruvayur.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "station_weather", "id": 3162, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of trains starting from each origin.", "output": "SELECT origin , count(*) FROM train GROUP BY origin", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of trains starting from each origin.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "station_weather", "id": 3163, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the train whose route runs through greatest number of stations.", "output": "SELECT t1.name FROM train AS t1 JOIN route AS t2 ON t1.id = t2.train_id GROUP BY t2.train_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the train whose route runs through greatest number of stations.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "station_weather", "id": 3164, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of trains for each station, as well as the station network name and services.", "output": "SELECT count(*) , t1.network_name , t1.services FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id GROUP BY t2.station_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of trains for each station, as well as the station network name and services.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "station_weather", "id": 3165, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average high temperature for each day of week?", "output": "SELECT avg(high_temperature) , day_of_week FROM weekly_weather GROUP BY day_of_week", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average high temperature for each day of week?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "station_weather", "id": 3166, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the maximum low temperature and average precipitation at the Amersham station.", "output": "SELECT max(t1.low_temperature) , avg(t1.precipitation) FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id WHERE t2.network_name = \"Amersham\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the maximum low temperature and average precipitation at the Amersham station.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "station_weather", "id": 3167, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find names and times of trains that run through stations for the local authority Chiltern.", "output": "SELECT t3.name , t3.time FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = \"Chiltern\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find names and times of trains that run through stations for the local authority Chiltern.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "station_weather", "id": 3168, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different services are provided by all stations?", "output": "SELECT count(DISTINCT services) FROM station", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different services are provided by all stations?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "station_weather", "id": 3169, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id and local authority of the station with has the highest average high temperature.", "output": "SELECT t2.id , t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id ORDER BY avg(high_temperature) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id and local authority of the station with has the highest average high temperature.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "station_weather", "id": 3170, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id and local authority of the station whose maximum precipitation is higher than 50.", "output": "SELECT t2.id , t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id HAVING max(t1.precipitation) > 50", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id and local authority of the station whose maximum precipitation is higher than 50.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "station_weather", "id": 3171, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "show the lowest low temperature and highest wind speed in miles per hour.", "output": "SELECT min(low_temperature) , max(wind_speed_mph) FROM weekly_weather", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: show the lowest low temperature and highest wind speed in miles per hour.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "station_weather", "id": 3172, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the origins from which more than 1 train starts.", "output": "SELECT origin FROM train GROUP BY origin HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the origins from which more than 1 train starts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3173, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of professors in accounting department.", "output": "SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = \"Accounting\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of professors in accounting department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3174, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many professors are in the accounting dept?", "output": "SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = \"Accounting\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many professors are in the accounting dept?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3175, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many professors are teaching class with code ACCT-211?", "output": "SELECT count(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE = \"ACCT-211\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many professors are teaching class with code ACCT-211?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3176, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many professors teach a class with the code ACCT-211?", "output": "SELECT count(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE = \"ACCT-211\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many professors teach a class with the code ACCT-211?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3177, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first and last name of the professor in biology department?", "output": "SELECT T3.EMP_FNAME , T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = \"Biology\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first and last name of the professor in biology department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3178, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last name of all biology professors?", "output": "SELECT T3.EMP_FNAME , T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = \"Biology\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last name of all biology professors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3179, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names and date of birth of professors teaching course ACCT-211?", "output": "SELECT DISTINCT T1.EMP_FNAME , T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = \"ACCT-211\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names and date of birth of professors teaching course ACCT-211?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3180, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names and birthdates of the professors in charge of ACCT-211?", "output": "SELECT DISTINCT T1.EMP_FNAME , T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = \"ACCT-211\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names and birthdates of the professors in charge of ACCT-211?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3181, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many classes are professor whose last name is Graztevski has?", "output": "SELECT count(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many classes are professor whose last name is Graztevski has?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3182, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many classes does the professor whose last name is Graztevski teach?", "output": "SELECT count(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many classes does the professor whose last name is Graztevski teach?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3183, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the code of the school where the accounting department belongs to?", "output": "SELECT school_code FROM department WHERE dept_name = \"Accounting\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the code of the school where the accounting department belongs to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3184, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the school code of the accounting department?", "output": "SELECT school_code FROM department WHERE dept_name = \"Accounting\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the school code of the accounting department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3185, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many credits does course CIS-220 have, and what its description?", "output": "SELECT crs_credit , crs_description FROM course WHERE crs_code = 'CIS-220'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many credits does course CIS-220 have, and what its description?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3186, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description for the CIS-220 and how many credits does it have?", "output": "SELECT crs_credit , crs_description FROM course WHERE crs_code = 'CIS-220'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description for the CIS-220 and how many credits does it have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3187, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what is the address of history department?", "output": "SELECT dept_address FROM department WHERE dept_name = 'History'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what is the address of history department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3188, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Where is the history department?", "output": "SELECT dept_address FROM department WHERE dept_name = 'History'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Where is the history department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3189, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different locations does the school with code BUS has?", "output": "SELECT count(DISTINCT dept_address) FROM department WHERE school_code = 'BUS'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different locations does the school with code BUS has?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3190, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different locations of the school with the code BUS?", "output": "SELECT count(DISTINCT dept_address) FROM department WHERE school_code = 'BUS'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different locations of the school with the code BUS?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3191, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different locations does each school have?", "output": "SELECT count(DISTINCT dept_address) , school_code FROM department GROUP BY school_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different locations does each school have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3192, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count different addresses of each school.", "output": "SELECT count(DISTINCT dept_address) , school_code FROM department GROUP BY school_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count different addresses of each school.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3193, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the description and credit for the course QM-261?", "output": "SELECT crs_credit , crs_description FROM course WHERE crs_code = 'QM-261'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the description and credit for the course QM-261?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3194, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the course description and number of credits for QM-261?", "output": "SELECT crs_credit , crs_description FROM course WHERE crs_code = 'QM-261'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the course description and number of credits for QM-261?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3195, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of departments in each school.", "output": "SELECT count(DISTINCT dept_name) , school_code FROM department GROUP BY school_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of departments in each school.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3196, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many departments are in each school?", "output": "SELECT count(DISTINCT dept_name) , school_code FROM department GROUP BY school_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many departments are in each school?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3197, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of different departments in each school whose number of different departments is less than 5.", "output": "SELECT count(DISTINCT dept_name) , school_code FROM department GROUP BY school_code HAVING count(DISTINCT dept_name) < 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of different departments in each school whose number of different departments is less than 5.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3198, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different departments are there in each school that has less than 5 apartments?", "output": "SELECT count(DISTINCT dept_name) , school_code FROM department GROUP BY school_code HAVING count(DISTINCT dept_name) < 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different departments are there in each school that has less than 5 apartments?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3199, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many sections does each course has?", "output": "SELECT count(*) , crs_code FROM CLASS GROUP BY crs_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many sections does each course has?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3200, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many sections does each course have?", "output": "SELECT count(*) , crs_code FROM CLASS GROUP BY crs_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many sections does each course have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3201, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total credit does each department offer?", "output": "SELECT sum(crs_credit) , dept_code FROM course GROUP BY dept_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total credit does each department offer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3202, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many credits does the department offer?", "output": "SELECT sum(crs_credit) , dept_code FROM course GROUP BY dept_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many credits does the department offer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3203, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of classes offered for all class rooms that held at least 2 classes.", "output": "SELECT count(*) , class_room FROM CLASS GROUP BY class_room HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of classes offered for all class rooms that held at least 2 classes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3204, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each classroom with at least 2 classes, how many classes are offered?", "output": "SELECT count(*) , class_room FROM CLASS GROUP BY class_room HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each classroom with at least 2 classes, how many classes are offered?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3205, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of classes in each department.", "output": "SELECT count(*) , dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of classes in each department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3206, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many classes are held in each department?", "output": "SELECT count(*) , dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many classes are held in each department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3207, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of classes in each school.", "output": "SELECT count(*) , T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T2.dept_code = T3.dept_code GROUP BY T3.school_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of classes in each school.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3208, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many classes exist for each school?", "output": "SELECT count(*) , T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T2.dept_code = T3.dept_code GROUP BY T3.school_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many classes exist for each school?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3209, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of professors for different school?", "output": "SELECT count(*) , T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of professors for different school?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3210, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different professors are there for the different schools?", "output": "SELECT count(*) , T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different professors are there for the different schools?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3211, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the count and code of the job has most employees.", "output": "SELECT emp_jobcode , count(*) FROM employee GROUP BY emp_jobcode ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the count and code of the job has most employees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3212, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the count and code of the job with the most employee?", "output": "SELECT emp_jobcode , count(*) FROM employee GROUP BY emp_jobcode ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the count and code of the job with the most employee?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3213, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which school has the smallest amount of professors?", "output": "SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which school has the smallest amount of professors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3214, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which school has the fewest professors?", "output": "SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which school has the fewest professors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3215, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of professors with a Ph.D. degree in each department.", "output": "SELECT count(*) , dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of professors with a Ph.D. degree in each department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3216, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many professors have a Ph.D. in each department?", "output": "SELECT count(*) , dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many professors have a Ph.D. in each department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3217, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of students for each department.", "output": "SELECT count(*) , dept_code FROM student GROUP BY dept_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of students for each department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3218, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are in each department?", "output": "SELECT count(*) , dept_code FROM student GROUP BY dept_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students are in each department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3219, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total number of hours have done for all students in each department.", "output": "SELECT sum(stu_hrs) , dept_code FROM student GROUP BY dept_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total number of hours have done for all students in each department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3220, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many hours do the students spend studying in each department?", "output": "SELECT sum(stu_hrs) , dept_code FROM student GROUP BY dept_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many hours do the students spend studying in each department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3221, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the max, average, and minimum gpa of all students in each department.", "output": "SELECT max(stu_gpa) , avg(stu_gpa) , min(stu_gpa) , dept_code FROM student GROUP BY dept_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the max, average, and minimum gpa of all students in each department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3222, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the highest, lowest, and average student GPA for every department?", "output": "SELECT max(stu_gpa) , avg(stu_gpa) , min(stu_gpa) , dept_code FROM student GROUP BY dept_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the highest, lowest, and average student GPA for every department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3223, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and the average gpa of department whose students have the highest average gpa?", "output": "SELECT T2.dept_name , avg(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY avg(T1.stu_gpa) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and the average gpa of department whose students have the highest average gpa?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3224, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which department has the highest average student GPA, and what is the average gpa?", "output": "SELECT T2.dept_name , avg(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY avg(T1.stu_gpa) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which department has the highest average student GPA, and what is the average gpa?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3225, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "how many schools exist in total?", "output": "SELECT count(DISTINCT school_code) FROM department", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: how many schools exist in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3226, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many schools are there in the department?", "output": "SELECT count(DISTINCT school_code) FROM department", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many schools are there in the department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3227, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different classes are there?", "output": "SELECT count(DISTINCT class_code) FROM CLASS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different classes are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3228, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many unique classes are offered?", "output": "SELECT count(DISTINCT class_code) FROM CLASS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many unique classes are offered?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3229, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many courses are offered?", "output": "SELECT count(DISTINCT crs_code) FROM CLASS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many courses are offered?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3230, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the number of different course codes?", "output": "SELECT count(DISTINCT crs_code) FROM CLASS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the number of different course codes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3231, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many departments does the college has?", "output": "SELECT count(DISTINCT dept_name) FROM department", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many departments does the college has?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3232, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different departments are there?", "output": "SELECT count(DISTINCT dept_name) FROM department", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different departments are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3233, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many courses are offered by the Computer Info. Systems department?", "output": "SELECT count(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = \"Computer Info. Systems\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many courses are offered by the Computer Info. Systems department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3234, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many courses does the department of Computer Information Systmes offer?", "output": "SELECT count(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = \"Computer Info. Systems\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many courses does the department of Computer Information Systmes offer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3235, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many sections does course ACCT-211 has?", "output": "SELECT count(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many sections does course ACCT-211 has?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3236, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of different class sections offered in the course ACCT-211?", "output": "SELECT count(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of different class sections offered in the course ACCT-211?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3237, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total credits of all classes offered by each department.", "output": "SELECT sum(T1.crs_credit) , T1.dept_code FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code GROUP BY T1.dept_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total credits of all classes offered by each department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3238, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the total number of credits offered by each department?", "output": "SELECT sum(T1.crs_credit) , T1.dept_code FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code GROUP BY T1.dept_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the total number of credits offered by each department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3239, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the department that offers the largest number of credits of all classes.", "output": "SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T1.dept_code = T3.dept_code GROUP BY T1.dept_code ORDER BY sum(T1.crs_credit) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the department that offers the largest number of credits of all classes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3240, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which department offers the most credits all together?", "output": "SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T1.dept_code = T3.dept_code GROUP BY T1.dept_code ORDER BY sum(T1.crs_credit) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which department offers the most credits all together?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3241, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students enrolled in class ACCT-211?", "output": "SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students enrolled in class ACCT-211?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3242, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the total number of students enrolled in ACCT-211?", "output": "SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the total number of students enrolled in ACCT-211?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3243, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name of each student enrolled in class ACCT-211?", "output": "SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name of each student enrolled in class ACCT-211?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3244, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all students in course ACCT-211?", "output": "SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of all students in course ACCT-211?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3245, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name of students enrolled in class ACCT-211 and got grade C?", "output": "SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' AND T2.enroll_grade = 'C'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name of students enrolled in class ACCT-211 and got grade C?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3246, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all students who took ACCT-211 and received a C?", "output": "SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' AND T2.enroll_grade = 'C'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of all students who took ACCT-211 and received a C?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3247, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total number of employees.", "output": "SELECT count(*) FROM employee", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total number of employees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3248, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many employees are there all together?", "output": "SELECT count(*) FROM employee", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many employees are there all together?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3249, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many professors do have a Ph.D. degree?", "output": "SELECT count(*) FROM professor WHERE prof_high_degree = 'Ph.D.'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many professors do have a Ph.D. degree?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3250, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of professors with a Ph.D. ?", "output": "SELECT count(*) FROM professor WHERE prof_high_degree = 'Ph.D.'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of professors with a Ph.D. ?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3251, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are enrolled in the class taught by some professor from the accounting department?", "output": "SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code WHERE T4.dept_name = 'Accounting'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students are enrolled in the class taught by some professor from the accounting department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3252, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are enrolled in some classes that are taught by an accounting professor?", "output": "SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code WHERE T4.dept_name = 'Accounting'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students are enrolled in some classes that are taught by an accounting professor?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3253, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the department that has the largest number of students enrolled?", "output": "SELECT T4.dept_name FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code GROUP BY T3.dept_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the department that has the largest number of students enrolled?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3254, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the department with the most students enrolled?", "output": "SELECT T4.dept_name FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code GROUP BY T3.dept_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the department with the most students enrolled?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3255, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "list names of all departments ordered by their names.", "output": "SELECT dept_name FROM department ORDER BY dept_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: list names of all departments ordered by their names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3256, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all departments in alphabetical order?", "output": "SELECT dept_name FROM department ORDER BY dept_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all departments in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3257, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the codes of all courses that take place in room KLR209.", "output": "SELECT class_code FROM CLASS WHERE class_room = 'KLR209'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the codes of all courses that take place in room KLR209.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3258, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the codes of all the courses that are located in room KLR209?", "output": "SELECT class_code FROM CLASS WHERE class_room = 'KLR209'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the codes of all the courses that are located in room KLR209?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3259, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the first name of all employees with job code PROF ordered by their date of birth.", "output": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' ORDER BY emp_dob", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the first name of all employees with job code PROF ordered by their date of birth.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3260, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all employees that are professors ordered by date of birth?", "output": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' ORDER BY emp_dob", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of all employees that are professors ordered by date of birth?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3261, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names and offices of all professors sorted by alphabetical order of their first name.", "output": "SELECT T2.emp_fname , T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names and offices of all professors sorted by alphabetical order of their first name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3262, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names and office locations for all professors sorted alphabetically by first name?", "output": "SELECT T2.emp_fname , T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names and office locations for all professors sorted alphabetically by first name?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3263, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first and last name of the oldest employee?", "output": "SELECT emp_fname , emp_lname FROM employee ORDER BY emp_dob LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first and last name of the oldest employee?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3264, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of the employee with the earliest date of birth?", "output": "SELECT emp_fname , emp_lname FROM employee ORDER BY emp_dob LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last names of the employee with the earliest date of birth?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3265, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first, last name, gpa of the youngest one among students whose GPA is above 3?", "output": "SELECT stu_fname , stu_lname , stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first, last name, gpa of the youngest one among students whose GPA is above 3?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3266, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first and last name of the youngest student with a GPA above 3, and what is their GPA?", "output": "SELECT stu_fname , stu_lname , stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first and last name of the youngest student with a GPA above 3, and what is their GPA?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3267, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name of students who got grade C in any class?", "output": "SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name of students who got grade C in any class?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3268, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all students who got a grade C in a class?", "output": "SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of all students who got a grade C in a class?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3269, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of department where has the smallest number of professors?", "output": "SELECT T2.dept_name FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of department where has the smallest number of professors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3270, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the department with the fewest professors?", "output": "SELECT T2.dept_name FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the department with the fewest professors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3271, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of department where has the largest number of professors with a Ph.D. degree?", "output": "SELECT T2.dept_name , T1.dept_code FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.prof_high_degree = 'Ph.D.' GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of department where has the largest number of professors with a Ph.D. degree?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3272, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which department has the most professors with a Ph.D.?", "output": "SELECT T2.dept_name , T1.dept_code FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.prof_high_degree = 'Ph.D.' GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which department has the most professors with a Ph.D.?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3273, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of the professors who do not teach a class.", "output": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of the professors who do not teach a class.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3274, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all professors not teaching any classes?", "output": "SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of all professors not teaching any classes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3275, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first names of the professors from the history department who do not teach a class.", "output": "SELECT T1.emp_fname FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History' EXCEPT SELECT T4.emp_fname FROM employee AS T4 JOIN CLASS AS T5 ON T4.emp_num = T5.prof_num", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first names of the professors from the history department who do not teach a class.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3276, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all history professors who do not teach?", "output": "SELECT T1.emp_fname FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History' EXCEPT SELECT T4.emp_fname FROM employee AS T4 JOIN CLASS AS T5 ON T4.emp_num = T5.prof_num", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of all history professors who do not teach?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3277, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last name and office of the professor from the history department?", "output": "SELECT T1.emp_lname , T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the last name and office of the professor from the history department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3278, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the last name and office of all history professors?", "output": "SELECT T1.emp_lname , T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the last name and office of all history professors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3279, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is department name and office for the professor whose last name is Heffington?", "output": "SELECT T3.dept_name , T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T1.emp_lname = 'Heffington'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is department name and office for the professor whose last name is Heffington?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3280, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the department and office location for the professor with the last name of Heffington?", "output": "SELECT T3.dept_name , T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T1.emp_lname = 'Heffington'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the department and office location for the professor with the last name of Heffington?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3281, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last name and hire date of the professor who is in office DRE 102.", "output": "SELECT T1.emp_lname , T1.emp_hiredate FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num WHERE T2.prof_office = 'DRE 102'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the last name and hire date of the professor who is in office DRE 102.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3282, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last name of the professor whose office is located in DRE 102, and when were they hired?", "output": "SELECT T1.emp_lname , T1.emp_hiredate FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num WHERE T2.prof_office = 'DRE 102'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the last name of the professor whose office is located in DRE 102, and when were they hired?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3283, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the code of the course which the student whose last name is Smithson took?", "output": "SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the code of the course which the student whose last name is Smithson took?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3284, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the course codes for every class that the student with the last name Smithson took?", "output": "SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the course codes for every class that the student with the last name Smithson took?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3285, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the description and credit of the course which the student whose last name is Smithson took?", "output": "SELECT T4.crs_description , T4.crs_credit FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num JOIN course AS T4 ON T4.crs_code = T1.crs_code WHERE T3.stu_lname = 'Smithson'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the description and credit of the course which the student whose last name is Smithson took?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3286, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many credits is the course that the student with the last name Smithson took, and what is its description?", "output": "SELECT T4.crs_description , T4.crs_credit FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num JOIN course AS T4 ON T4.crs_code = T1.crs_code WHERE T3.stu_lname = 'Smithson'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many credits is the course that the student with the last name Smithson took, and what is its description?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3287, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many professors who has a either Ph.D. or MA degree?", "output": "SELECT count(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many professors who has a either Ph.D. or MA degree?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3288, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many professors attained either Ph.D. or Masters degrees?", "output": "SELECT count(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many professors attained either Ph.D. or Masters degrees?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3289, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many professors who are from either Accounting or Biology department?", "output": "SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T2.dept_name = 'Accounting' OR T2.dept_name = 'Biology'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many professors who are from either Accounting or Biology department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3290, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of professors who are in the Accounting or Biology departments?", "output": "SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T2.dept_name = 'Accounting' OR T2.dept_name = 'Biology'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of professors who are in the Accounting or Biology departments?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3291, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261.", "output": "SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'CIS-220' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'QM-261'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3292, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name of the professor who is teaching CIS-220 and QM-261?", "output": "SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'CIS-220' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'QM-261'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name of the professor who is teaching CIS-220 and QM-261?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3293, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name of student who is taking classes from accounting and Computer Info. Systems departments", "output": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Accounting' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Computer Info. Systems'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first name of student who is taking classes from accounting and Computer Info. Systems departments,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3294, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all students taking accoutning and Computer Information Systems classes?", "output": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Accounting' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Computer Info. Systems'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of all students taking accoutning and Computer Information Systems classes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3295, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average gpa of the students enrolled in the course with code ACCT-211?", "output": "SELECT avg(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T1.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average gpa of the students enrolled in the course with code ACCT-211?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3296, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average GPA of students taking ACCT-211?", "output": "SELECT avg(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T1.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average GPA of students taking ACCT-211?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3297, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name, gpa and phone number of the top 5 students with highest gpa?", "output": "SELECT stu_gpa , stu_phone , stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name, gpa and phone number of the top 5 students with highest gpa?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3298, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name, GPA, and phone number of the students with the top 5 GPAs?", "output": "SELECT stu_gpa , stu_phone , stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name, GPA, and phone number of the students with the top 5 GPAs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3299, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the department name of the students with lowest gpa belongs to?", "output": "SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the department name of the students with lowest gpa belongs to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3300, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the department with the student that has the lowest GPA?", "output": "SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the department with the student that has the lowest GPA?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3301, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name and gpa of the students whose gpa is lower than the average gpa of all students.", "output": "SELECT stu_fname , stu_gpa FROM student WHERE stu_gpa < (SELECT avg(stu_gpa) FROM student)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first name and gpa of the students whose gpa is lower than the average gpa of all students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3302, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name and GPA of every student that has a GPA lower than average?", "output": "SELECT stu_fname , stu_gpa FROM student WHERE stu_gpa < (SELECT avg(stu_gpa) FROM student)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name and GPA of every student that has a GPA lower than average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3303, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and address of the department that has the highest number of students.", "output": "SELECT T2.dept_name , T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and address of the department that has the highest number of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3304, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and address of the department with the most students?", "output": "SELECT T2.dept_name , T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and address of the department with the most students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3305, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name, address, number of students in the departments that have the top 3 highest number of students.", "output": "SELECT T2.dept_name , T2.dept_address , count(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name, address, number of students in the departments that have the top 3 highest number of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3306, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name, address, and number of students in the departments that have the 3 most students?", "output": "SELECT T2.dept_name , T2.dept_address , count(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name, address, and number of students in the departments that have the 3 most students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3307, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name and office of the professor who is in the history department and has a Ph.D. degree.", "output": "SELECT T1.emp_fname , T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T3.dept_code = T2.dept_code WHERE T3.dept_name = 'History' AND T2.prof_high_degree = 'Ph.D.'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first name and office of the professor who is in the history department and has a Ph.D. degree.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3308, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names and office of the professors who are in the history department and have a Ph.D?", "output": "SELECT T1.emp_fname , T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T3.dept_code = T2.dept_code WHERE T3.dept_name = 'History' AND T2.prof_high_degree = 'Ph.D.'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names and office of the professors who are in the history department and have a Ph.D?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3309, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of all instructors who have taught some course and the course code.", "output": "SELECT T2.emp_fname , T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names of all instructors who have taught some course and the course code.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3310, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all teachers who have taught a course and the corresponding course codes?", "output": "SELECT T2.emp_fname , T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of all teachers who have taught a course and the corresponding course codes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3311, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of all instructors who have taught some course and the course description.", "output": "SELECT T2.emp_fname , T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names of all instructors who have taught some course and the course description.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3312, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all teachers who have taught a course and the corresponding descriptions?", "output": "SELECT T2.emp_fname , T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of all teachers who have taught a course and the corresponding descriptions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3313, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names and offices of all instructors who have taught some course and also find the course description.", "output": "SELECT T2.emp_fname , T4.prof_office , T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names and offices of all instructors who have taught some course and also find the course description.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3314, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names, office locations of all lecturers who have taught some course?", "output": "SELECT T2.emp_fname , T4.prof_office , T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names, office locations of all lecturers who have taught some course?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3315, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names and offices of all instructors who have taught some course and the course description and the department name.", "output": "SELECT T2.emp_fname , T4.prof_office , T3.crs_description , T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num JOIN department AS T5 ON T4.dept_code = T5.dept_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names and offices of all instructors who have taught some course and the course description and the department name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3316, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names, office locations, and departments of all instructors, and also what are the descriptions of the courses they teach?", "output": "SELECT T2.emp_fname , T4.prof_office , T3.crs_description , T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num JOIN department AS T5 ON T4.dept_code = T5.dept_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names, office locations, and departments of all instructors, and also what are the descriptions of the courses they teach?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3317, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find names of all students who took some course and the course description.", "output": "SELECT T1.stu_fname , T1.stu_lname , T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find names of all students who took some course and the course description.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3318, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all students who took a class and the corresponding course descriptions?", "output": "SELECT T1.stu_fname , T1.stu_lname , T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all students who took a class and the corresponding course descriptions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3319, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find names of all students who took some course and got A or C.", "output": "SELECT T1.stu_fname , T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'C' OR T2.enroll_grade = 'A'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find names of all students who took some course and got A or C.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3320, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all students taking a course who received an A or C?", "output": "SELECT T1.stu_fname , T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'C' OR T2.enroll_grade = 'A'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all students taking a course who received an A or C?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3321, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of all professors in the Accounting department who is teaching some course and the class room.", "output": "SELECT T2.emp_fname , T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names of all professors in the Accounting department who is teaching some course and the class room.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3322, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all Accounting professors who teach and what are the classrooms of the courses they teach?", "output": "SELECT T2.emp_fname , T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of all Accounting professors who teach and what are the classrooms of the courses they teach?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3323, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department.", "output": "SELECT DISTINCT T2.emp_fname , T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Computer Info. Systems'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3324, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different first names and highest degree attained for professors teaching in the Computer Information Systems department?", "output": "SELECT DISTINCT T2.emp_fname , T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Computer Info. Systems'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different first names and highest degree attained for professors teaching in the Computer Information Systems department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3325, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last name of the student who got a grade A in the class with code 10018.", "output": "SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the last name of the student who got a grade A in the class with code 10018.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3326, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last name of the student who received an A in the class with the code 10018?", "output": "SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the last name of the student who received an A in the class with the code 10018?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3327, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name and office of history professor who did not get a Ph.D. degree.", "output": "SELECT T2.emp_fname , T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree != 'Ph.D.'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first name and office of history professor who did not get a Ph.D. degree.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3328, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names and offices of history professors who don't have Ph.D.s?", "output": "SELECT T2.emp_fname , T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree != 'Ph.D.'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names and offices of history professors who don't have Ph.D.s?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3329, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of professors who are teaching more than one class.", "output": "SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num GROUP BY T1.prof_num HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names of professors who are teaching more than one class.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3330, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all professors who teach more than one class?", "output": "SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num GROUP BY T1.prof_num HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of all professors who teach more than one class?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3331, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of students who took exactly one class.", "output": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num GROUP BY T2.stu_num HAVING count(*) = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names of students who took exactly one class.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3332, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of student who only took one course?", "output": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num GROUP BY T2.stu_num HAVING count(*) = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of student who only took one course?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3333, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of department that offers the class whose description has the word \"Statistics\".", "output": "SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.crs_description LIKE '%Statistics%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of department that offers the class whose description has the word \"Statistics\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3334, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the department that offers a course that has a description including the word \"Statistics\"?", "output": "SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.crs_description LIKE '%Statistics%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the department that offers a course that has a description including the word \"Statistics\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3335, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class?", "output": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' AND T1.stu_lname LIKE 'S%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_1", "id": 3336, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name of the student whose last name starts with the letter S and is taking ACCT-211?", "output": "SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' AND T1.stu_lname LIKE 'S%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name of the student whose last name starts with the letter S and is taking ACCT-211?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3337, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many clubs are there?", "output": "SELECT count(*) FROM club", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many clubs are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3338, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of clubs?", "output": "SELECT count(*) FROM club", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of clubs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3339, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the distinct region of clubs in ascending alphabetical order.", "output": "SELECT DISTINCT Region FROM club ORDER BY Region ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the distinct region of clubs in ascending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3340, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different regions of clubs in ascending alphabetical order?", "output": "SELECT DISTINCT Region FROM club ORDER BY Region ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different regions of clubs in ascending alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3341, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of gold medals for clubs?", "output": "SELECT avg(Gold) FROM club_rank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average number of gold medals for clubs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3342, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of gold medals for a club?", "output": "SELECT avg(Gold) FROM club_rank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average number of gold medals for a club?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3343, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the types and countries of competitions?", "output": "SELECT Competition_type , Country FROM competition", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the types and countries of competitions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3344, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the types of every competition and in which countries are they located?", "output": "SELECT Competition_type , Country FROM competition", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the types of every competition and in which countries are they located?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3345, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct years in which the competitions type is not \"Tournament\"?", "output": "SELECT DISTINCT YEAR FROM competition WHERE Competition_type != \"Tournament\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct years in which the competitions type is not \"Tournament\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3346, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different years for all competitions that are not of type equal to tournament?", "output": "SELECT DISTINCT YEAR FROM competition WHERE Competition_type != \"Tournament\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different years for all competitions that are not of type equal to tournament?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3347, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum and minimum number of silver medals for clubs.", "output": "SELECT max(Silver) , min(Silver) FROM club_rank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum and minimum number of silver medals for clubs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3348, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum and minimum number of silver medals for all the clubs?", "output": "SELECT max(Silver) , min(Silver) FROM club_rank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum and minimum number of silver medals for all the clubs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3349, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many clubs have total medals less than 10?", "output": "SELECT count(*) FROM club_rank WHERE Total < 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many clubs have total medals less than 10?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3350, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of clubs that have less than 10 medals in total?", "output": "SELECT count(*) FROM club_rank WHERE Total < 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of clubs that have less than 10 medals in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3351, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all club names in ascending order of start year.", "output": "SELECT name FROM club ORDER BY Start_year ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all club names in ascending order of start year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3352, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the clubs starting with the oldest?", "output": "SELECT name FROM club ORDER BY Start_year ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the clubs starting with the oldest?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3353, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all club names in descending alphabetical order.", "output": "SELECT name FROM club ORDER BY name DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all club names in descending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3354, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the clubs ordered in descending alphabetical order?", "output": "SELECT name FROM club ORDER BY name DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the clubs ordered in descending alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3355, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the names and the players of clubs.", "output": "SELECT T1.name , T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the names and the players of clubs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3356, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and players of all the clubs?", "output": "SELECT T1.name , T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and players of all the clubs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3357, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of clubs that have players with position \"Right Wing\".", "output": "SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = \"Right Wing\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of clubs that have players with position \"Right Wing\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3358, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the clubs that have players in the position of \"Right Wing\"?", "output": "SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = \"Right Wing\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the clubs that have players in the position of \"Right Wing\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3359, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average points of players from club with name \"AIB\".", "output": "SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = \"AIB\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average points of players from club with name \"AIB\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3360, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of points for players from the \"AIB\" club?", "output": "SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = \"AIB\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average number of points for players from the \"AIB\" club?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3361, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the position of players and the average number of points of players of each position.", "output": "SELECT POSITION , avg(Points) FROM player GROUP BY POSITION", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the position of players and the average number of points of players of each position.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3362, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each position, what is the average number of points for players in that position?", "output": "SELECT POSITION , avg(Points) FROM player GROUP BY POSITION", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each position, what is the average number of points for players in that position?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3363, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the position of players with average number of points scored by players of that position bigger than 20.", "output": "SELECT POSITION FROM player GROUP BY name HAVING avg(Points) >= 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the position of players with average number of points scored by players of that position bigger than 20.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3364, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the positions of players whose average number of points scored by that position is larger than 20?", "output": "SELECT POSITION FROM player GROUP BY name HAVING avg(Points) >= 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the positions of players whose average number of points scored by that position is larger than 20?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3365, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the types of competition and the number of competitions of each type.", "output": "SELECT Competition_type , COUNT(*) FROM competition GROUP BY Competition_type", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the types of competition and the number of competitions of each type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3366, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the types of competition and number of competitions for that type?", "output": "SELECT Competition_type , COUNT(*) FROM competition GROUP BY Competition_type", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the types of competition and number of competitions for that type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3367, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the most common type of competition.", "output": "SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the most common type of competition.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3368, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most common competition type?", "output": "SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most common competition type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3369, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the types of competition that have at most five competitions of that type.", "output": "SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the types of competition that have at most five competitions of that type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3370, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the types of competition that have most 5 competitions for that type?", "output": "SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the types of competition that have most 5 competitions for that type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3371, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of clubs that do not have any players.", "output": "SELECT name FROM CLub WHERE Club_ID NOT IN (SELECT Club_ID FROM player)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of clubs that do not have any players.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3372, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all clubs that do not have any players?", "output": "SELECT name FROM CLub WHERE Club_ID NOT IN (SELECT Club_ID FROM player)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all clubs that do not have any players?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3373, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the positions with both players having more than 20 points and less than 10 points.", "output": "SELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the positions with both players having more than 20 points and less than 10 points.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3374, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the positions of both players that have more than 20 20 points and less than 10 points?", "output": "SELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the positions of both players that have more than 20 20 points and less than 10 points?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3375, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show total points of all players.", "output": "SELECT sum(Points) FROM player", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show total points of all players.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3376, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of points for all players?", "output": "SELECT sum(Points) FROM player", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of points for all players?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3377, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "how many different positions are there?", "output": "SELECT count(DISTINCT POSITION) FROM player", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: how many different positions are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3378, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different position for players are listed?", "output": "SELECT count(DISTINCT POSITION) FROM player", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different position for players are listed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3379, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what are the name of players who get more than the average points.", "output": "SELECT name FROM player WHERE points > (SELECT avg(points) FROM player)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what are the name of players who get more than the average points.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3380, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all players that got more than the average number of points?", "output": "SELECT name FROM player WHERE points > (SELECT avg(points) FROM player)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all players that got more than the average number of points?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3381, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the number of players whose points are lower than 30 in each position.", "output": "SELECT count(*) , POSITION FROM player WHERE points < 30 GROUP BY POSITION", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: find the number of players whose points are lower than 30 in each position.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3382, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of players who have points less than 30 for each position?", "output": "SELECT count(*) , POSITION FROM player WHERE points < 30 GROUP BY POSITION", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of players who have points less than 30 for each position?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3383, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "which country did participated in the most number of Tournament competitions?", "output": "SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: which country did participated in the most number of Tournament competitions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3384, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what is the name of the country that participated in the most tournament competitions?", "output": "SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what is the name of the country that participated in the most tournament competitions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3385, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "which countries did participated in both Friendly and Tournament type competitions.", "output": "SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: which countries did participated in both Friendly and Tournament type competitions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3386, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the countries that participated in both friendly and tournament type competitions?", "output": "SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the countries that participated in both friendly and tournament type competitions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3387, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the countries that have never participated in any competition with Friendly type.", "output": "SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the countries that have never participated in any competition with Friendly type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "sports_competition", "id": 3388, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the countries that have never participated in any friendly-type competitions?", "output": "SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the countries that have never participated in any friendly-type competitions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufacturer", "id": 3389, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many furniture components are there in total?", "output": "SELECT sum(num_of_component) FROM furniture", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many furniture components are there in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufacturer", "id": 3390, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name and id of the furniture with the highest market rate.", "output": "SELECT name , furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the name and id of the furniture with the highest market rate.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufacturer", "id": 3391, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the total market rate of the furnitures that have the top 2 market shares.", "output": "SELECT sum(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: find the total market rate of the furnitures that have the top 2 market shares.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufacturer", "id": 3392, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the component amounts and names of all furnitures that have more than 10 components.", "output": "SELECT Num_of_Component , name FROM furniture WHERE Num_of_Component > 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the component amounts and names of all furnitures that have more than 10 components.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufacturer", "id": 3393, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and component amount of the least popular furniture.", "output": "SELECT name , Num_of_Component FROM furniture ORDER BY market_rate LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and component amount of the least popular furniture.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufacturer", "id": 3394, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of furnitures whose prices are lower than the highest price.", "output": "SELECT t1.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID WHERE t2.Price_in_Dollar < (SELECT max(Price_in_Dollar) FROM furniture_manufacte)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of furnitures whose prices are lower than the highest price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufacturer", "id": 3395, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which manufacturer has the most number of shops? List its name and year of opening.", "output": "SELECT open_year , name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which manufacturer has the most number of shops? List its name and year of opening.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufacturer", "id": 3396, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average number of factories for the manufacturers that have more than 20 shops.", "output": "SELECT avg(Num_of_Factories) FROM manufacturer WHERE num_of_shops > 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average number of factories for the manufacturers that have more than 20 shops.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufacturer", "id": 3397, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all manufacturer names and ids ordered by their opening year.", "output": "SELECT name , manufacturer_id FROM manufacturer ORDER BY open_year", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all manufacturer names and ids ordered by their opening year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufacturer", "id": 3398, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops.", "output": "SELECT name , open_year FROM manufacturer WHERE num_of_shops > 10 OR Num_of_Factories < 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufacturer", "id": 3399, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what is the average number of factories and maximum number of shops for manufacturers that opened before 1990.", "output": "SELECT max(num_of_shops) , avg(Num_of_Factories) FROM manufacturer WHERE open_year < 1990", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what is the average number of factories and maximum number of shops for manufacturers that opened before 1990.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufacturer", "id": 3400, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id and number of shops for the company that produces the most expensive furniture.", "output": "SELECT t1.manufacturer_id , t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id and number of shops for the company that produces the most expensive furniture.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufacturer", "id": 3401, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of funiture types produced by each manufacturer as well as the company names.", "output": "SELECT count(*) , t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id GROUP BY t1.manufacturer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of funiture types produced by each manufacturer as well as the company names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufacturer", "id": 3402, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the names and prices of furnitures which some companies are manufacturing.", "output": "SELECT t1.name , t2.price_in_dollar FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the names and prices of furnitures which some companies are manufacturing.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufacturer", "id": 3403, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the market shares and names of furnitures which no any company is producing in our records.", "output": "SELECT Market_Rate , name FROM furniture WHERE Furniture_ID NOT IN (SELECT Furniture_ID FROM furniture_manufacte)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the market shares and names of furnitures which no any company is producing in our records.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufacturer", "id": 3404, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components.", "output": "SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id = t3.manufacturer_id WHERE t1.num_of_component < 6 INTERSECT SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id = t3.manufacturer_id WHERE t1.num_of_component > 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3405, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Display the first name and department name for each employee.", "output": "SELECT T1.first_name , T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Display the first name and department name for each employee.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3406, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first name and department name of all employees?", "output": "SELECT T1.first_name , T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first name and department name of all employees?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3407, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the full name (first and last name), and salary for those employees who earn below 6000.", "output": "SELECT first_name , last_name , salary FROM employees WHERE salary < 6000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the full name (first and last name), and salary for those employees who earn below 6000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3408, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names and salaries for any employees earning less than 6000?", "output": "SELECT first_name , last_name , salary FROM employees WHERE salary < 6000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full names and salaries for any employees earning less than 6000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3409, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Display the first name, and department number for all employees whose last name is \"McEwen\".", "output": "SELECT first_name , department_id FROM employees WHERE last_name = 'McEwen'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Display the first name, and department number for all employees whose last name is \"McEwen\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3410, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names and department numbers for employees with last name McEwen?", "output": "SELECT first_name , department_id FROM employees WHERE last_name = 'McEwen'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names and department numbers for employees with last name McEwen?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3411, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return all the information for all employees without any department number.", "output": "SELECT * FROM employees WHERE department_id = \"null\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return all the information for all employees without any department number.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3412, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the employees without a department number?", "output": "SELECT * FROM employees WHERE department_id = \"null\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the employees without a department number?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3413, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Display all the information about the department Marketing.", "output": "SELECT * FROM departments WHERE department_name = 'Marketing'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Display all the information about the department Marketing.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3414, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is all the information about the Marketing department?", "output": "SELECT * FROM departments WHERE department_name = 'Marketing'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is all the information about the Marketing department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3415, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "when is the hire date for those employees whose first name does not containing the letter M?", "output": "SELECT hire_date FROM employees WHERE first_name NOT LIKE '%M%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: when is the hire date for those employees whose first name does not containing the letter M?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3416, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "On what dates were employees without the letter M in their first names hired?", "output": "SELECT hire_date FROM employees WHERE first_name NOT LIKE '%M%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: On what dates were employees without the letter M in their first names hired?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3417, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT first_name , last_name , hire_date , salary , department_id FROM employees WHERE first_name NOT LIKE '%M%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3418, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full name, hire date, salary, and department id for employees without the letter M in their first name?", "output": "SELECT first_name , last_name , hire_date , salary , department_id FROM employees WHERE first_name NOT LIKE '%M%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full name, hire date, salary, and department id for employees without the letter M in their first name?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3419, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT first_name , last_name , hire_date , salary , department_id FROM employees WHERE first_name NOT LIKE '%M%' ORDER BY department_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3420, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT first_name , last_name , hire_date , salary , department_id FROM employees WHERE first_name NOT LIKE '%M%' ORDER BY department_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3421, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what is the phone number of employees whose salary is in the range of 8000 and 12000?", "output": "SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what is the phone number of employees whose salary is in the range of 8000 and 12000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3422, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the phone numbers of employees with salaries between 8000 and 12000.", "output": "SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the phone numbers of employees with salaries between 8000 and 12000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3423, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct != \"null\" OR department_id != 40", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3424, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct != \"null\" OR department_id != 40", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3425, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full name (first and last name) and salary for all employees who does not have any value for commission?", "output": "SELECT first_name , last_name , salary FROM employees WHERE commission_pct = \"null\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full name (first and last name) and salary for all employees who does not have any value for commission?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3426, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the full names and salaries of employees with null commissions.", "output": "SELECT first_name , last_name , salary FROM employees WHERE commission_pct = \"null\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the full names and salaries of employees with null commissions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3427, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Display the first and last name, and salary for those employees whose first name is ending with the letter m.", "output": "SELECT first_name , last_name , salary FROM employees WHERE first_name LIKE '%m'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Display the first and last name, and salary for those employees whose first name is ending with the letter m.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3428, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the full names and salaries for employees with first names that end with the letter m.", "output": "SELECT first_name , last_name , salary FROM employees WHERE first_name LIKE '%m'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the full names and salaries for employees with first names that end with the letter m.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3429, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find job id and date of hire for those employees who was hired between November 5th, 2007 and July 5th, 2009.", "output": "SELECT job_id , hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find job id and date of hire for those employees who was hired between November 5th, 2007 and July 5th, 2009.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3430, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the job ids and dates of hire for employees hired after November 5th, 2007 and before July 5th, 2009?", "output": "SELECT job_id , hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the job ids and dates of hire for employees hired after November 5th, 2007 and before July 5th, 2009?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3431, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last name for those employees who works either in department 70 or 90?", "output": "SELECT first_name , last_name FROM employees WHERE department_id = 70 OR department_id = 90", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last name for those employees who works either in department 70 or 90?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3432, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names of employees who with in department 70 or 90?", "output": "SELECT first_name , last_name FROM employees WHERE department_id = 70 OR department_id = 90", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full names of employees who with in department 70 or 90?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3433, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the salary and manager number for those employees who is working under a manager.", "output": "SELECT salary , manager_id FROM employees WHERE manager_id != \"null\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the salary and manager number for those employees who is working under a manager.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3434, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the salaries and manager ids for employees who have managers?", "output": "SELECT salary , manager_id FROM employees WHERE manager_id != \"null\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the salaries and manager ids for employees who have managers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3435, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display all the details from Employees table for those employees who was hired before 2002-06-21.", "output": "SELECT * FROM employees WHERE hire_date < '2002-06-21'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display all the details from Employees table for those employees who was hired before 2002-06-21.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3436, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is all the information about employees hired before June 21, 2002?", "output": "SELECT * FROM employees WHERE hire_date < '2002-06-21'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is all the information about employees hired before June 21, 2002?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3437, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3438, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is all the information about employees with D or S in their first name, ordered by salary descending?", "output": "SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is all the information about employees with D or S in their first name, ordered by salary descending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3439, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display those employees who joined after 7th September, 1987.", "output": "SELECT * FROM employees WHERE hire_date > '1987-09-07'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display those employees who joined after 7th September, 1987.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3440, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which employees were hired after September 7th, 1987?", "output": "SELECT * FROM employees WHERE hire_date > '1987-09-07'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which employees were hired after September 7th, 1987?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3441, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the job title of jobs which minimum salary is greater than 9000.", "output": "SELECT job_title FROM jobs WHERE min_salary > 9000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the job title of jobs which minimum salary is greater than 9000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3442, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which job titles correspond to jobs with salaries over 9000?", "output": "SELECT job_title FROM jobs WHERE min_salary > 9000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which job titles correspond to jobs with salaries over 9000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3443, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000.", "output": "SELECT job_title , max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3444, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000?", "output": "SELECT job_title , max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3445, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT email FROM employees WHERE commission_pct = \"null\" AND salary BETWEEN 7000 AND 12000 AND department_id = 50", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3446, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the emails of employees with null commission, salary between 7000 and 12000, and who work in department 50?", "output": "SELECT email FROM employees WHERE commission_pct = \"null\" AND salary BETWEEN 7000 AND 12000 AND department_id = 50", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the emails of employees with null commission, salary between 7000 and 12000, and who work in department 50?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3447, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the employee ID for each employee and the date on which he ended his previous job.", "output": "SELECT employee_id , MAX(end_date) FROM job_history GROUP BY employee_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the employee ID for each employee and the date on which he ended his previous job.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3448, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the employee ids for each employee and final dates of employment at their last job?", "output": "SELECT employee_id , MAX(end_date) FROM job_history GROUP BY employee_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the employee ids for each employee and final dates of employment at their last job?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3449, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display those departments where more than ten employees work who got a commission percentage.", "output": "SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display those departments where more than ten employees work who got a commission percentage.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3450, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the department ids for which more than 10 employees had a commission?", "output": "SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the department ids for which more than 10 employees had a commission?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3451, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the ids of the departments where any manager is managing 4 or more employees.", "output": "SELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 4", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the ids of the departments where any manager is managing 4 or more employees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3452, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are department ids for departments with managers managing more than 3 employees?", "output": "SELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 4", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are department ids for departments with managers managing more than 3 employees?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3453, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the average salary of employees for each department who gets a commission percentage.", "output": "SELECT department_id , AVG(salary) FROM employees WHERE commission_pct != \"null\" GROUP BY department_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the average salary of employees for each department who gets a commission percentage.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3454, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average salary of employees who have a commission percentage that is not null?", "output": "SELECT department_id , AVG(salary) FROM employees WHERE commission_pct != \"null\" GROUP BY department_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average salary of employees who have a commission percentage that is not null?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3455, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the country ID and number of cities for each country.", "output": "SELECT country_id , COUNT(*) FROM locations GROUP BY country_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the country ID and number of cities for each country.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3456, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the country id and corresponding count of cities in each country.", "output": "SELECT country_id , COUNT(*) FROM locations GROUP BY country_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the country id and corresponding count of cities in each country.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3457, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display job ID for those jobs that were done by two or more for more than 300 days.", "output": "SELECT job_id FROM job_history WHERE end_date - start_date > 300 GROUP BY job_id HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display job ID for those jobs that were done by two or more for more than 300 days.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3458, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the job ids for jobs done more than once for a period of more than 300 days?", "output": "SELECT job_id FROM job_history WHERE end_date - start_date > 300 GROUP BY job_id HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the job ids for jobs done more than once for a period of more than 300 days?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3459, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the ID for those employees who did two or more jobs in the past.", "output": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the ID for those employees who did two or more jobs in the past.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3460, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the employee ids for employees who have held two or more jobs?", "output": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the employee ids for employees who have held two or more jobs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3461, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find employee with ID and name of the country presently where (s)he is working.", "output": "SELECT T1.employee_id , T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find employee with ID and name of the country presently where (s)he is working.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3462, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the employee ids and the names of the countries in which they work?", "output": "SELECT T1.employee_id , T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the employee ids and the names of the countries in which they work?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3463, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the department name and number of employees in each of the department.", "output": "SELECT T2.department_name , COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY T2.department_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the department name and number of employees in each of the department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3464, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the name of each department and the number of employees in each.", "output": "SELECT T2.department_name , COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY T2.department_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the name of each department and the number of employees in each.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3465, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3466, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is all the job history info done by employees earning a salary greater than or equal to 12000?", "output": "SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is all the job history info done by employees earning a salary greater than or equal to 12000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3467, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display job title and average salary of employees.", "output": "SELECT job_title , AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display job title and average salary of employees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3468, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average salary for each job title?", "output": "SELECT job_title , AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average salary for each job title?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3469, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163?", "output": "SELECT first_name , last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163 )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3470, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Provide the full names of employees earning more than the employee with id 163.", "output": "SELECT first_name , last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163 )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Provide the full names of employees earning more than the employee with id 163.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3471, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "return the smallest salary for every departments.", "output": "SELECT MIN(salary) , department_id FROM employees GROUP BY department_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: return the smallest salary for every departments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3472, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the minimum salary in each department?", "output": "SELECT MIN(salary) , department_id FROM employees GROUP BY department_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the minimum salary in each department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3473, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT first_name , last_name , department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3474, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names and department ids for the lowest paid employees across all departments.", "output": "SELECT first_name , last_name , department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full names and department ids for the lowest paid employees across all departments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3475, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the employee id for all employees who earn more than the average salary.", "output": "SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the employee id for all employees who earn more than the average salary.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3476, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the employee ids for employees who make more than the average?", "output": "SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the employee ids for employees who make more than the average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3477, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the employee id and salary of all employees who report to Payam (first name).", "output": "SELECT employee_id , salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam' )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the employee id and salary of all employees who report to Payam (first name).,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3478, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the employee ids of employees who report to Payam, and what are their salaries?", "output": "SELECT employee_id , salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam' )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the employee ids of employees who report to Payam, and what are their salaries?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3479, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the name of all departments that do actually have one or more employees assigned to them.", "output": "SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: find the name of all departments that do actually have one or more employees assigned to them.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3480, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of departments that have at least one employee.", "output": "SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of departments that have at least one employee.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3481, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "get the details of employees who manage a department.", "output": "SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: get the details of employees who manage a department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3482, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is all the information regarding employees who are managers?", "output": "SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is all the information regarding employees who are managers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3483, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display all the information about the department Marketing.", "output": "SELECT * FROM departments WHERE department_name = 'Marketing'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display all the information about the department Marketing.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3484, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is all the information about the Marketing department?", "output": "SELECT * FROM departments WHERE department_name = 'Marketing'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is all the information about the Marketing department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3485, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the ID for those employees who did two or more jobs in the past.", "output": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the ID for those employees who did two or more jobs in the past.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3486, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the employee ids for those who had two or more jobs.", "output": "SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the employee ids for those who had two or more jobs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3487, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the unique ids of those departments where any manager is managing 4 or more employees.", "output": "SELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 4", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the unique ids of those departments where any manager is managing 4 or more employees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3488, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the distinct department ids of departments in which a manager is in charge of 4 or more employees?", "output": "SELECT DISTINCT department_id FROM employees GROUP BY department_id , manager_id HAVING COUNT(employee_id) >= 4", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the distinct department ids of departments in which a manager is in charge of 4 or more employees?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3489, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the job ID for those jobs which average salary is above 8000.", "output": "SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the job ID for those jobs which average salary is above 8000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3490, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the job ids corresponding to jobs with average salary above 8000?", "output": "SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the job ids corresponding to jobs with average salary above 8000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3491, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the employee ID and job name for all those jobs in department 80.", "output": "SELECT T1.employee_id , T2.job_title FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.department_id = 80", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the employee ID and job name for all those jobs in department 80.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3492, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what are the employee ids and job titles for employees in department 80?", "output": "SELECT T1.employee_id , T2.job_title FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.department_id = 80", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what are the employee ids and job titles for employees in department 80?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3493, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name and job id for all employees in the Finance department?", "output": "SELECT T1.first_name , T1.job_id FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T2.department_name = 'Finance'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name and job id for all employees in the Finance department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3494, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the first name and job id for all employees in the Finance department.", "output": "SELECT T1.first_name , T1.job_id FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T2.department_name = 'Finance'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the first name and job id for all employees in the Finance department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3495, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display all the information of the employees whose salary if within the range of smallest salary and 2500.", "output": "SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display all the information of the employees whose salary if within the range of smallest salary and 2500.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3496, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is all the information regarding employees with salaries above the minimum and under 2500?", "output": "SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is all the information regarding employees with salaries above the minimum and under 2500?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3497, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT * FROM employees WHERE department_id NOT IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3498, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids for employees who do not work in departments with managers that have ids between 100 and 200?", "output": "SELECT * FROM employees WHERE department_id NOT IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids for employees who do not work in departments with managers that have ids between 100 and 200?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3499, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara.", "output": "SELECT first_name , last_name , hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = \"Clara\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3500, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names and hire dates for employees in the same department as someone with the first name Clara?", "output": "SELECT first_name , last_name , hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = \"Clara\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full names and hire dates for employees in the same department as someone with the first name Clara?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3501, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara.", "output": "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\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3502, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names and hire dates for employees in the same department as someone with the first name Clara, not including Clara?", "output": "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\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full names and hire dates for employees in the same department as someone with the first name Clara, not including Clara?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3503, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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 \u2019T\u2019.", "output": "SELECT employee_id , first_name , last_name FROM employees WHERE department_id IN ( SELECT department_id FROM employees WHERE first_name LIKE '%T%' )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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 \u2019T\u2019.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3504, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT employee_id , first_name , last_name FROM employees WHERE department_id IN ( SELECT department_id FROM employees WHERE first_name LIKE '%T%' )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3505, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "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%')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3506, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "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%')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3507, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT employee_id , job_id FROM employees WHERE salary < ( SELECT min(salary) FROM employees WHERE job_id = 'MK_MAN' )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3508, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the employee ids and job ids for employees who make less than the lowest earning employee with title MK_MAN?", "output": "SELECT employee_id , job_id FROM employees WHERE salary < ( SELECT min(salary) FROM employees WHERE job_id = 'MK_MAN' )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the employee ids and job ids for employees who make less than the lowest earning employee with title MK_MAN?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3509, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT employee_id , first_name , last_name , job_id FROM employees WHERE salary > ( SELECT max(salary) FROM employees WHERE job_id = 'PU_MAN' )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3510, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title PU_MAN?", "output": "SELECT employee_id , first_name , last_name , job_id FROM employees WHERE salary > ( SELECT max(salary) FROM employees WHERE job_id = 'PU_MAN' )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title PU_MAN?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3511, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the department id and the total salary for those departments which contains at least two employees.", "output": "SELECT department_id , SUM(salary) FROM employees GROUP BY department_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the department id and the total salary for those departments which contains at least two employees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3512, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are total salaries and department id for each department that has more than 2 employees?", "output": "SELECT department_id , SUM(salary) FROM employees GROUP BY department_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are total salaries and department id for each department that has more than 2 employees?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3513, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display all the information of those employees who did not have any job in the past.", "output": "SELECT * FROM employees WHERE employee_id NOT IN (SELECT employee_id FROM job_history)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display all the information of those employees who did not have any job in the past.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3514, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is all the information about employees who have never had a job in the past?", "output": "SELECT * FROM employees WHERE employee_id NOT IN (SELECT employee_id FROM job_history)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is all the information about employees who have never had a job in the past?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3515, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the department ID, full name (first and last name), salary for those employees who is highest salary in every department.", "output": "SELECT first_name , last_name , salary , department_id , MAX(salary) FROM employees GROUP BY department_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the department ID, full name (first and last name), salary for those employees who is highest salary in every department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3516, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the department ids, full names, and salaries for employees who make the most in their departments?", "output": "SELECT first_name , last_name , salary , department_id , MAX(salary) FROM employees GROUP BY department_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the department ids, full names, and salaries for employees who make the most in their departments?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3517, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the first and last name, department, city, and state province for each employee.", "output": "SELECT T1.first_name , T1.last_name , T2.department_name , T3.city , T3.state_province FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the first and last name, department, city, and state province for each employee.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3518, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names, departments, cities, and state provinces for each employee?", "output": "SELECT T1.first_name , T1.last_name , T2.department_name , T3.city , T3.state_province FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full names, departments, cities, and state provinces for each employee?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3519, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display those employees who contain a letter z to their first name and also display their last name, city.", "output": "SELECT T1.first_name , T1.last_name , T3.city FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T1.first_name LIKE '%z%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display those employees who contain a letter z to their first name and also display their last name, city.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3520, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names and cities of employees who have the letter Z in their first names?", "output": "SELECT T1.first_name , T1.last_name , T3.city FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T1.first_name LIKE '%z%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full names and cities of employees who have the letter Z in their first names?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3521, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the department name, city, and state province for each department.", "output": "SELECT T1.department_name , T2.city , T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the department name, city, and state province for each department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3522, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the department names, cities, and state provinces for each department?", "output": "SELECT T1.department_name , T2.city , T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the department names, cities, and state provinces for each department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3523, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the full name (first and last name ) of employee with ID and name of the country presently where (s)he is working.", "output": "SELECT T1.first_name , T1.last_name , T1.employee_id , T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the full name (first and last name ) of employee with ID and name of the country presently where (s)he is working.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3524, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What the full names, ids of each employee and the name of the country they are in?", "output": "SELECT T1.first_name , T1.last_name , T1.employee_id , T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What the full names, ids of each employee and the name of the country they are in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3525, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the department name and number of employees in each of the department.", "output": "SELECT department_name , COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the department name and number of employees in each of the department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3526, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the department names and how many employees work in each of them?", "output": "SELECT department_name , COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the department names and how many employees work in each of them?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3527, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "display the full name (first and last name), and salary of those employees who working in any department located in London.", "output": "SELECT first_name , last_name , salary FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T3.city = 'London'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: display the full name (first and last name), and salary of those employees who working in any department located in London.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hr_1", "id": 3528, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are full names and salaries of employees working in the city of London?", "output": "SELECT first_name , last_name , salary FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T3.city = 'London'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are full names and salaries of employees working in the city of London?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3529, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the song that was released in the most recent year?", "output": "SELECT song_name , releasedate FROM song ORDER BY releasedate DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the song that was released in the most recent year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3530, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the song that was released most recently?", "output": "SELECT song_name , releasedate FROM song ORDER BY releasedate DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the song that was released most recently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3531, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the longest song?", "output": "SELECT f_id FROM files ORDER BY duration DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the longest song?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3532, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of the song that lasts the longest.", "output": "SELECT f_id FROM files ORDER BY duration DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id of the song that lasts the longest.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3533, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all English songs.", "output": "SELECT song_name FROM song WHERE languages = \"english\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all English songs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3534, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all songs in English?", "output": "SELECT song_name FROM song WHERE languages = \"english\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all songs in English?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3535, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the id of songs whose format is mp3.", "output": "SELECT f_id FROM files WHERE formats = \"mp3\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the id of songs whose format is mp3.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3536, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the id of all the files in mp3 format?", "output": "SELECT f_id FROM files WHERE formats = \"mp3\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the id of all the files in mp3 format?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3537, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name and country of origin for all singers who have produced songs with rating above 9.", "output": "SELECT DISTINCT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name and country of origin for all singers who have produced songs with rating above 9.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3538, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different names and countries of origins for all artists whose song ratings are above 9?", "output": "SELECT DISTINCT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different names and countries of origins for all artists whose song ratings are above 9?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3539, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the file size and format for all songs that have resolution lower than 800.", "output": "SELECT DISTINCT T1.file_size , T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the file size and format for all songs that have resolution lower than 800.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3540, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the file sizes and formats for all songs with a resolution lower than 800?", "output": "SELECT DISTINCT T1.file_size , T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the file sizes and formats for all songs with a resolution lower than 800?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3541, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the artist who produced the shortest song?", "output": "SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the artist who produced the shortest song?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3542, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the artists who sang the shortest song?", "output": "SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the artists who sang the shortest song?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3543, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and countries of origin for the artists who produced the top three highly rated songs.", "output": "SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.rating DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and countries of origin for the artists who produced the top three highly rated songs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3544, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the singers who sang the top 3 most highly rated songs and what countries do they hail from?", "output": "SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.rating DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the singers who sang the top 3 most highly rated songs and what countries do they hail from?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3545, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many songs have 4 minute duration?", "output": "SELECT count(*) FROM files WHERE duration LIKE \"4:%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many songs have 4 minute duration?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3546, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the count of the songs that last approximately 4 minutes?", "output": "SELECT count(*) FROM files WHERE duration LIKE \"4:%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the count of the songs that last approximately 4 minutes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3547, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many artists are from Bangladesh?", "output": "SELECT count(*) FROM artist WHERE country = \"Bangladesh\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many artists are from Bangladesh?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3548, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many Bangladeshi artists are listed?", "output": "SELECT count(*) FROM artist WHERE country = \"Bangladesh\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many Bangladeshi artists are listed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3549, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average rating of songs produced by female artists?", "output": "SELECT avg(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = \"Female\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average rating of songs produced by female artists?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3550, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many songs, on average, are sung by a female artist?", "output": "SELECT avg(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = \"Female\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many songs, on average, are sung by a female artist?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3551, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most popular file format?", "output": "SELECT formats FROM files GROUP BY formats ORDER BY COUNT (*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most popular file format?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3552, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the file format that is used by the most files.", "output": "SELECT formats FROM files GROUP BY formats ORDER BY COUNT (*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the file format that is used by the most files.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3553, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the artists who are from UK and have produced English songs.", "output": "SELECT artist_name FROM artist WHERE country = \"UK\" INTERSECT SELECT artist_name FROM song WHERE languages = \"english\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the artists who are from UK and have produced English songs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3554, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the artists that are from the UK and sang songs in English?", "output": "SELECT artist_name FROM artist WHERE country = \"UK\" INTERSECT SELECT artist_name FROM song WHERE languages = \"english\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the artists that are from the UK and sang songs in English?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3555, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of songs that are available in mp4 format and have resolution lower than 1000.", "output": "SELECT f_id FROM files WHERE formats = \"mp4\" INTERSECT SELECT f_id FROM song WHERE resolution < 1000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id of songs that are available in mp4 format and have resolution lower than 1000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3556, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the files that are available in the format of mp4 and a resolution smaller than 1000?", "output": "SELECT f_id FROM files WHERE formats = \"mp4\" INTERSECT SELECT f_id FROM song WHERE resolution < 1000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the files that are available in the format of mp4 and a resolution smaller than 1000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3557, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the country of origin of the artist who is female and produced a song in Bangla?", "output": "SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = \"Female\" AND T2.languages = \"bangla\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the country of origin of the artist who is female and produced a song in Bangla?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3558, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What countries are the female artists who sung in the language Bangla from?", "output": "SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = \"Female\" AND T2.languages = \"bangla\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What countries are the female artists who sung in the language Bangla from?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3559, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average duration of songs that have mp3 format and resolution below 800?", "output": "SELECT avg(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = \"mp3\" AND T2.resolution < 800", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average duration of songs that have mp3 format and resolution below 800?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3560, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average song duration for the songs that are in mp3 format and whose resolution below 800?", "output": "SELECT avg(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = \"mp3\" AND T2.resolution < 800", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average song duration for the songs that are in mp3 format and whose resolution below 800?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3561, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of artists for each gender?", "output": "SELECT count(*) , gender FROM artist GROUP BY gender", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of artists for each gender?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3562, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many artists are male and how many are female?", "output": "SELECT count(*) , gender FROM artist GROUP BY gender", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many artists are male and how many are female?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3563, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average rating of songs for each language?", "output": "SELECT avg(rating) , languages FROM song GROUP BY languages", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average rating of songs for each language?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3564, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average song rating for each language?", "output": "SELECT avg(rating) , languages FROM song GROUP BY languages", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average song rating for each language?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3565, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the gender and name of artist who produced the song with the lowest resolution.", "output": "SELECT T1.gender , T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the gender and name of artist who produced the song with the lowest resolution.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3566, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the gender and name of the artist who sang the song with the smallest resolution?", "output": "SELECT T1.gender , T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the gender and name of the artist who sang the song with the smallest resolution?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3567, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each file format, return the number of artists who released songs in that format.", "output": "SELECT count(*) , formats FROM files GROUP BY formats", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each file format, return the number of artists who released songs in that format.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3568, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many songs were released for each format?", "output": "SELECT count(*) , formats FROM files GROUP BY formats", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many songs were released for each format?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3569, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct names of all songs that have a higher resolution than some songs in English.", "output": "SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT min(resolution) FROM song WHERE languages = \"english\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the distinct names of all songs that have a higher resolution than some songs in English.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3570, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different names for all songs that have a higher resolution than English songs?", "output": "SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT min(resolution) FROM song WHERE languages = \"english\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different names for all songs that have a higher resolution than English songs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3571, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all songs that have a lower rating than some song of blues genre?", "output": "SELECT song_name FROM song WHERE rating < (SELECT max(rating) FROM song WHERE genre_is = \"blues\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all songs that have a lower rating than some song of blues genre?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3572, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the songs that have a lower rating than at least one blues song?", "output": "SELECT song_name FROM song WHERE rating < (SELECT max(rating) FROM song WHERE genre_is = \"blues\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the songs that have a lower rating than at least one blues song?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3573, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and country of origin of the artist who released a song that has \"love\" in its title?", "output": "SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE \"%love%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and country of origin of the artist who released a song that has \"love\" in its title?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3574, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE \"%love%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3575, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name and gender for all artists who released songs in March.", "output": "SELECT T1.artist_name , T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE \"%Mar%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name and gender for all artists who released songs in March.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3576, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and genders of all artists who released songs in the month of March?", "output": "SELECT T1.artist_name , T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE \"%Mar%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and genders of all artists who released songs in the month of March?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3577, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all genres in alphabetical oder, together with its ratings.", "output": "SELECT g_name , rating FROM genre ORDER BY g_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of all genres in alphabetical oder, together with its ratings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3578, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all genres in alphabetical order, combined with its ratings?", "output": "SELECT g_name , rating FROM genre ORDER BY g_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all genres in alphabetical order, combined with its ratings?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3579, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me a list of the names of all songs ordered by their resolution.", "output": "SELECT song_name FROM song ORDER BY resolution", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me a list of the names of all songs ordered by their resolution.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3580, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all songs that are ordered by their resolution numbers?", "output": "SELECT song_name FROM song ORDER BY resolution", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all songs that are ordered by their resolution numbers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3581, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of songs that are available in either mp4 format or have resolution above 720?", "output": "SELECT f_id FROM files WHERE formats = \"mp4\" UNION SELECT f_id FROM song WHERE resolution > 720", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of songs that are available in either mp4 format or have resolution above 720?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3582, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all songs that are available on mp4 or have a higher resolution than 720?", "output": "SELECT f_id FROM files WHERE formats = \"mp4\" UNION SELECT f_id FROM song WHERE resolution > 720", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all songs that are available on mp4 or have a higher resolution than 720?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3583, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all songs that have 4 minute duration or are in English.", "output": "SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE \"4:%\" UNION SELECT song_name FROM song WHERE languages = \"english\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of all songs that have 4 minute duration or are in English.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3584, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all songs that are approximately 4 minutes long or are in English?", "output": "SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE \"4:%\" UNION SELECT song_name FROM song WHERE languages = \"english\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all songs that are approximately 4 minutes long or are in English?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3585, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the language used most often in the songs?", "output": "SELECT languages FROM song GROUP BY languages ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the language used most often in the songs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3586, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the languages that are used most often in songs?", "output": "SELECT languages FROM song GROUP BY languages ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the languages that are used most often in songs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3587, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the language that was used most often in songs with resolution above 500?", "output": "SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the language that was used most often in songs with resolution above 500?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3588, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the artist, for each language, that has the most songs with a higher resolution than 500?", "output": "SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the artist, for each language, that has the most songs with a higher resolution than 500?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3589, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of artists who are Male and are from UK?", "output": "SELECT artist_name FROM artist WHERE country = \"UK\" AND gender = \"Male\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of artists who are Male and are from UK?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3590, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all male British artists?", "output": "SELECT artist_name FROM artist WHERE country = \"UK\" AND gender = \"Male\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all male British artists?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3591, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of songs whose genre is modern or language is English.", "output": "SELECT song_name FROM song WHERE genre_is = \"modern\" OR languages = \"english\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of songs whose genre is modern or language is English.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3592, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the songs that are modern or sung in English?", "output": "SELECT song_name FROM song WHERE genre_is = \"modern\" OR languages = \"english\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the songs that are modern or sung in English?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3593, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of songs for which format is mp3 and resolution is below 1000.", "output": "SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = \"mp3\" INTERSECT SELECT song_name FROM song WHERE resolution < 1000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names of songs for which format is mp3 and resolution is below 1000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3594, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all songs that are in mp3 format and have a resolution lower than 1000?", "output": "SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = \"mp3\" INTERSECT SELECT song_name FROM song WHERE resolution < 1000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all songs that are in mp3 format and have a resolution lower than 1000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3595, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of singers who are from UK and released an English song.", "output": "SELECT artist_name FROM artist WHERE country = \"UK\" INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"english\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names of singers who are from UK and released an English song.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3596, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all singers that are from the UK and released a song in English?", "output": "SELECT artist_name FROM artist WHERE country = \"UK\" INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"english\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all singers that are from the UK and released a song in English?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3597, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average rating and resolution of songs that are in Bangla?", "output": "SELECT avg(rating) , avg(resolution) FROM song WHERE languages = \"bangla\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the average rating and resolution of songs that are in Bangla?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3598, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average rating and resolution of all bangla songs?", "output": "SELECT avg(rating) , avg(resolution) FROM song WHERE languages = \"bangla\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average rating and resolution of all bangla songs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3599, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum and minimum resolution of songs whose duration is 3 minutes?", "output": "SELECT max(T2.resolution) , min(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE \"3:%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum and minimum resolution of songs whose duration is 3 minutes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3600, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum and minimum resolution of all songs that are approximately 3 minutes long?", "output": "SELECT max(T2.resolution) , min(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE \"3:%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the maximum and minimum resolution of all songs that are approximately 3 minutes long?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3601, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum duration and resolution of songs grouped and ordered by languages?", "output": "SELECT max(T1.duration) , max(T2.resolution) , T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum duration and resolution of songs grouped and ordered by languages?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3602, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum duration and resolution of all songs, for each language, ordered alphabetically by language?", "output": "SELECT max(T1.duration) , max(T2.resolution) , T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum duration and resolution of all songs, for each language, ordered alphabetically by language?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3603, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre?", "output": "SELECT min(T1.duration) , min(T2.rating) , T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3604, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the shortest and most poorly rated song for each genre, ordered alphabetically by genre?", "output": "SELECT min(T1.duration) , min(T2.rating) , T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the shortest and most poorly rated song for each genre, ordered alphabetically by genre?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3605, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names and number of works of all artists who have at least one English songs.", "output": "SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"english\" GROUP BY T2.artist_name HAVING count(*) >= 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names and number of works of all artists who have at least one English songs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3606, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and number of works for all artists who have sung at least one song in English?", "output": "SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"english\" GROUP BY T2.artist_name HAVING count(*) >= 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and number of works for all artists who have sung at least one song in English?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3607, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and country of origin for all artists who have release at least one song of resolution above 900.", "output": "SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING count(*) >= 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and country of origin for all artists who have release at least one song of resolution above 900.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3608, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and country of origin for each artist who has released a song with a resolution higher than 900?", "output": "SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING count(*) >= 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and country of origin for each artist who has released a song with a resolution higher than 900?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3609, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names and number of works of the three artists who have produced the most songs.", "output": "SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names and number of works of the three artists who have produced the most songs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3610, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the three artists who have produced the most songs, and how many works did they produce?", "output": "SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the three artists who have produced the most songs, and how many works did they produce?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3611, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the country of origin for the artist who made the least number of songs?", "output": "SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the country of origin for the artist who made the least number of songs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3612, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What country is the artist who made the fewest songs from?", "output": "SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What country is the artist who made the fewest songs from?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3613, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the songs whose rating is below the rating of all songs in English?", "output": "SELECT song_name FROM song WHERE rating < (SELECT min(rating) FROM song WHERE languages = 'english')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the songs whose rating is below the rating of all songs in English?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3614, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the song names for every song whose rating is less than the minimum rating for English songs?", "output": "SELECT song_name FROM song WHERE rating < (SELECT min(rating) FROM song WHERE languages = 'english')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the song names for every song whose rating is less than the minimum rating for English songs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3615, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is ids of the songs whose resolution is higher than the resolution of any songs with rating lower than 8?", "output": "SELECT f_id FROM song WHERE resolution > (SELECT max(resolution) FROM song WHERE rating < 8)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is ids of the songs whose resolution is higher than the resolution of any songs with rating lower than 8?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3616, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of every song that has a resolution higher than that of a song with a rating below 8?", "output": "SELECT f_id FROM song WHERE resolution > (SELECT max(resolution) FROM song WHERE rating < 8)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of every song that has a resolution higher than that of a song with a rating below 8?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3617, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre?", "output": "SELECT f_id FROM song WHERE resolution > (SELECT avg(resolution) FROM song WHERE genre_is = \"modern\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3618, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all songs that have higher resolution of the average resolution in the modern genre?", "output": "SELECT f_id FROM song WHERE resolution > (SELECT avg(resolution) FROM song WHERE genre_is = \"modern\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all songs that have higher resolution of the average resolution in the modern genre?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3619, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the top 3 artists who have the largest number of songs works whose language is Bangla.", "output": "SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"bangla\" GROUP BY T2.artist_name ORDER BY count(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the top 3 artists who have the largest number of songs works whose language is Bangla.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3620, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the top 3 artists with the largest number of songs in the language Bangla?", "output": "SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"bangla\" GROUP BY T2.artist_name ORDER BY count(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the top 3 artists with the largest number of songs in the language Bangla?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3621, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the id, genre and artist name of English songs ordered by rating.", "output": "SELECT f_id , genre_is , artist_name FROM song WHERE languages = \"english\" ORDER BY rating", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the id, genre and artist name of English songs ordered by rating.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3622, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id, genre, and name of the artist for every English song ordered by ascending rating?", "output": "SELECT f_id , genre_is , artist_name FROM song WHERE languages = \"english\" ORDER BY rating", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id, genre, and name of the artist for every English song ordered by ascending rating?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3623, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the duration, file size and format of songs whose genre is pop, ordered by title?", "output": "SELECT T1.duration , T1.file_size , T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = \"pop\" ORDER BY T2.song_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the duration, file size and format of songs whose genre is pop, ordered by title?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3624, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the duration, file size, and song format for every pop song, ordered by title alphabetically?", "output": "SELECT T1.duration , T1.file_size , T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = \"pop\" ORDER BY T2.song_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the duration, file size, and song format for every pop song, ordered by title alphabetically?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3625, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the artists who have produced English songs but have never received rating higher than 8.", "output": "SELECT DISTINCT artist_name FROM song WHERE languages = \"english\" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the artists who have produced English songs but have never received rating higher than 8.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3626, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the different artists that have produced a song in English but have never receieved a rating higher than 8?", "output": "SELECT DISTINCT artist_name FROM song WHERE languages = \"english\" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the different artists that have produced a song in English but have never receieved a rating higher than 8?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3627, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the artists who are from Bangladesh and have never received rating higher than 7.", "output": "SELECT DISTINCT artist_name FROM artist WHERE country = \"Bangladesh\" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the artists who are from Bangladesh and have never received rating higher than 7.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_1", "id": 3628, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the different artists from Bangladesh who never received a rating higher than a 7?", "output": "SELECT DISTINCT artist_name FROM artist WHERE country = \"Bangladesh\" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the different artists from Bangladesh who never received a rating higher than a 7?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3629, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what is the full name and id of the college with the largest number of baseball players?", "output": "SELECT T1.name_full , T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY count(*) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: what is the full name and id of the college with the largest number of baseball players?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3630, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the full name and id of the college that has the most baseball players.", "output": "SELECT T1.name_full , T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY count(*) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find the full name and id of the college that has the most baseball players.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3631, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is average salary of the players in the team named 'Boston Red Stockings' ?", "output": "SELECT avg(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What is average salary of the players in the team named 'Boston Red Stockings' ?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3632, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Compute the average salary of the players in the team called 'Boston Red Stockings'.", "output": "SELECT avg(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Compute the average salary of the players in the team called 'Boston Red Stockings'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3633, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are first and last names of players participating in all star game in 1998?", "output": "SELECT name_first , name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are first and last names of players participating in all star game in 1998?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3634, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the first and last name for players who participated in all star game in 1998.", "output": "SELECT name_first , name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: List the first and last name for players who participated in all star game in 1998.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3635, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first name, last name and id of the player with the most all star game experiences? Also list the count.", "output": "SELECT T1.name_first , T1.name_last , T1.player_id , count(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the first name, last name and id of the player with the most all star game experiences? Also list the count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3636, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T1.name_first , T1.name_last , T1.player_id , count(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3637, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many players enter hall of fame each year?", "output": "SELECT yearid , count(*) FROM hall_of_fame GROUP BY yearid;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many players enter hall of fame each year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3638, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of players who enter hall of fame for each year.", "output": "SELECT yearid , count(*) FROM hall_of_fame GROUP BY yearid;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Count the number of players who enter hall of fame for each year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3639, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of attendance at home games for each year?", "output": "SELECT YEAR , avg(attendance) FROM home_game GROUP BY YEAR;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What is the average number of attendance at home games for each year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3640, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each year, return the year and the average number of attendance at home games.", "output": "SELECT YEAR , avg(attendance) FROM home_game GROUP BY YEAR;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: For each year, return the year and the average number of attendance at home games.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3641, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In 2014, what are the id and rank of the team that has the largest average number of attendance?", "output": "SELECT T2.team_id , T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY avg(T1.attendance) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: In 2014, what are the id and rank of the team that has the largest average number of attendance?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3642, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id and rank of the team that has the highest average attendance rate in 2014.", "output": "SELECT T2.team_id , T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY avg(T1.attendance) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find the id and rank of the team that has the highest average attendance rate in 2014.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3643, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the manager's first name, last name and id who won the most manager award?", "output": "SELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the manager's first name, last name and id who won the most manager award?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3644, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which manager won the most manager award? Give me the manager's first name, last name and id.", "output": "SELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Which manager won the most manager award? Give me the manager's first name, last name and id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3645, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many parks are there in the state of NY?", "output": "SELECT count(*) FROM park WHERE state = 'NY';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many parks are there in the state of NY?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3646, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show me the number of parks the state of NY has.", "output": "SELECT count(*) FROM park WHERE state = 'NY';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Show me the number of parks the state of NY has.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3647, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which 3 players won the most player awards? List their full name and id.", "output": "SELECT T1.name_first , T1.name_last , T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 3;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Which 3 players won the most player awards? List their full name and id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3648, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name, last name and id for the top three players won the most player awards.", "output": "SELECT T1.name_first , T1.name_last , T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 3;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find the first name, last name and id for the top three players won the most player awards.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3649, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List three countries which are the origins of the least players.", "output": "SELECT birth_country FROM player GROUP BY birth_country ORDER BY count(*) ASC LIMIT 3;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: List three countries which are the origins of the least players.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3650, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the three countries that the least players are from?", "output": "SELECT birth_country FROM player GROUP BY birth_country ORDER BY count(*) ASC LIMIT 3;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the three countries that the least players are from?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3651, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the players' first name and last name who have empty death record.", "output": "SELECT name_first , name_last FROM player WHERE death_year = '';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find all the players' first name and last name who have empty death record.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3652, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first name and last name of the players whose death record is empty?", "output": "SELECT name_first , name_last FROM player WHERE death_year = '';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the first name and last name of the players whose death record is empty?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3653, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many players born in USA are right-handed batters? That is, have the batter value 'R'.", "output": "SELECT count(*) FROM player WHERE birth_country = 'USA' AND bats = 'R';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many players born in USA are right-handed batters? That is, have the batter value 'R'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3654, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of players who were born in USA and have bats information 'R'.", "output": "SELECT count(*) FROM player WHERE birth_country = 'USA' AND bats = 'R';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Count the number of players who were born in USA and have bats information 'R'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3655, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average height of the players from the college named 'Yale University'?", "output": "SELECT avg(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What is the average height of the players from the college named 'Yale University'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3656, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average height of the players who belong to the college called 'Yale University'.", "output": "SELECT avg(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find the average height of the players who belong to the college called 'Yale University'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3657, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the highest salary among each team? List the team name, id and maximum salary.", "output": "SELECT T1.name , T1.team_id , max(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What is the highest salary among each team? List the team name, id and maximum salary.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3658, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each team, return the team name, id and the maximum salary among the team.", "output": "SELECT T1.name , T1.team_id , max(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: For each team, return the team name, id and the maximum salary among the team.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3659, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and id of the team offering the lowest average salary?", "output": "SELECT T1.name , T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY avg(T2.salary) ASC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the name and id of the team offering the lowest average salary?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3660, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which team offers the lowest average salary? Give me the name and id of the team.", "output": "SELECT T1.name , T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY avg(T2.salary) ASC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Which team offers the lowest average salary? Give me the name and id of the team.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3661, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the players' first name and last name who won award both in 1960 and in 1961.", "output": "SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1961", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find the players' first name and last name who won award both in 1960 and in 1961.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3662, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which players won awards in both 1960 and 1961? Return their first names and last names.", "output": "SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1961", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Which players won awards in both 1960 and 1961? Return their first names and last names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3663, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List players' first name and last name who have weight greater than 220 or height shorter than 75.", "output": "SELECT name_first , name_last FROM player WHERE weight > 220 OR height < 75", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: List players' first name and last name who have weight greater than 220 or height shorter than 75.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3664, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first name and last name of the players who have weight above 220 or height below 75?", "output": "SELECT name_first , name_last FROM player WHERE weight > 220 OR height < 75", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the first name and last name of the players who have weight above 220 or height below 75?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3665, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the maximum scores of the team Boston Red Stockings when the team won in postseason?", "output": "SELECT max(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: List the maximum scores of the team Boston Red Stockings when the team won in postseason?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3666, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum scores the team Boston Red Stockings got when the team won in postseason?", "output": "SELECT max(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the maximum scores the team Boston Red Stockings got when the team won in postseason?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3667, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many times did Boston Red Stockings lose in 2009 postseason?", "output": "SELECT count(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many times did Boston Red Stockings lose in 2009 postseason?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3668, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of times the team \"Boston Red Stockings\" lost in 2009 postseason.", "output": "SELECT count(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Count the number of times the team \"Boston Red Stockings\" lost in 2009 postseason.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3669, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and id of the team with the most victories in 2008 postseason?", "output": "SELECT T2.name , T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY count(*) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the name and id of the team with the most victories in 2008 postseason?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3670, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and id of the team that won the most times in 2008 postseason.", "output": "SELECT T2.name , T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY count(*) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find the name and id of the team that won the most times in 2008 postseason.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3671, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of wins the team Boston Red Stockings got in the postseasons each year in history?", "output": "SELECT count(*) , T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What is the number of wins the team Boston Red Stockings got in the postseasons each year in history?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3672, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each year, return the year and the number of times the team Boston Red Stockings won in the postseasons.", "output": "SELECT count(*) , T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: For each year, return the year and the number of times the team Boston Red Stockings won in the postseasons.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3673, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of postseason games that team Boston Red Stockings participated in?", "output": "SELECT count(*) FROM ( SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' );", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What is the total number of postseason games that team Boston Red Stockings participated in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3674, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many times in total did the team Boston Red Stockings participate in postseason games?", "output": "SELECT count(*) FROM ( SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' );", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many times in total did the team Boston Red Stockings participate in postseason games?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3675, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many games in 1885 postseason resulted in ties (that is, the value of \"ties\" is '1')?", "output": "SELECT count(*) FROM postseason WHERE YEAR = 1885 AND ties = 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many games in 1885 postseason resulted in ties (that is, the value of \"ties\" is '1')?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3676, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of tied games (the value of \"ties\" is '1') in 1885 postseason.", "output": "SELECT count(*) FROM postseason WHERE YEAR = 1885 AND ties = 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find the number of tied games (the value of \"ties\" is '1') in 1885 postseason.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3677, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total salary paid by team Boston Red Stockings in 2010?", "output": "SELECT sum(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What is the total salary paid by team Boston Red Stockings in 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3678, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total salary expenses of team Boston Red Stockings in 2010?", "output": "SELECT sum(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What is the total salary expenses of team Boston Red Stockings in 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3679, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many players were in the team Boston Red Stockings in 2000?", "output": "SELECT count(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many players were in the team Boston Red Stockings in 2000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3680, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many players did Boston Red Stockings have in 2000?", "output": "SELECT count(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many players did Boston Red Stockings have in 2000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3681, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the 3 highest salaries of the players in 2001?", "output": "SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: List the 3 highest salaries of the players in 2001?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3682, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How much salary did the top 3 well-paid players get in 2001?", "output": "SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How much salary did the top 3 well-paid players get in 2001?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3683, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What were all the salary values of players in 2010 and 2001?", "output": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What were all the salary values of players in 2010 and 2001?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3684, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the salary values players received in 2010 and 2001.", "output": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: List all the salary values players received in 2010 and 2001.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3685, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In which year did the least people enter hall of fame?", "output": "SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY count(*) ASC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: In which year did the least people enter hall of fame?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3686, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the year in which the least people enter hall of fame.", "output": "SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY count(*) ASC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find the year in which the least people enter hall of fame.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3687, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many parks are there in Atlanta city?", "output": "SELECT count(*) FROM park WHERE city = 'Atlanta';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many parks are there in Atlanta city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3688, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many parks does Atlanta city have?", "output": "SELECT count(*) FROM park WHERE city = 'Atlanta';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many parks does Atlanta city have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3689, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many games were played in park \"Columbia Park\" in 1907?", "output": "SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many games were played in park \"Columbia Park\" in 1907?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3690, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of games taken place in park \"Columbia Park\" in 1907.", "output": "SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Count the number of games taken place in park \"Columbia Park\" in 1907.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3691, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many games were played in city Atlanta in 2000?", "output": "SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many games were played in city Atlanta in 2000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3692, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of games taken place in city Atlanta in 2000.", "output": "SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find the number of games taken place in city Atlanta in 2000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3693, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total home game attendance of team Boston Red Stockings from 2000 to 2010?", "output": "SELECT sum(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What is the total home game attendance of team Boston Red Stockings from 2000 to 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3694, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many games in total did team Boston Red Stockings attend from 2000 to 2010?", "output": "SELECT sum(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many games in total did team Boston Red Stockings attend from 2000 to 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3695, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total?", "output": "SELECT sum(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3696, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Compute the total salary that the player with first name Len and last name Barker received between 1985 to 1990.", "output": "SELECT sum(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Compute the total salary that the player with first name Len and last name Barker received between 1985 to 1990.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3697, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007.", "output": "SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals'", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3698, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first name and last name of the players who were paid salary by team Washington Nationals in both 2005 and 2007?", "output": "SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals'", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the first name and last name of the players who were paid salary by team Washington Nationals in both 2005 and 2007?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3699, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many home games did the team Boston Red Stockings play from 1990 to 2000 in total?", "output": "SELECT sum(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many home games did the team Boston Red Stockings play from 1990 to 2000 in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3700, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the total number of games the team Boston Red Stockings attended from 1990 to 2000.", "output": "SELECT sum(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Count the total number of games the team Boston Red Stockings attended from 1990 to 2000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3701, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which team had the least number of attendances in home games in 1980?", "output": "SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Which team had the least number of attendances in home games in 1980?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3702, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the team that attended the least number of home games in 1980.", "output": "SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find the team that attended the least number of home games in 1980.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3703, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of states that have more than 2 parks.", "output": "SELECT state FROM park GROUP BY state HAVING count(*) > 2;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: List the names of states that have more than 2 parks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3704, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which states have more than 2 parks?", "output": "SELECT state FROM park GROUP BY state HAVING count(*) > 2;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Which states have more than 2 parks?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3705, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many team franchises are active, with active value 'Y'?", "output": "SELECT count(*) FROM team_franchise WHERE active = 'Y';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many team franchises are active, with active value 'Y'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3706, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of team franchises that are active (have 'Y' as \"active\" information).", "output": "SELECT count(*) FROM team_franchise WHERE active = 'Y';", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find the number of team franchises that are active (have 'Y' as \"active\" information).,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3707, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which cities have 2 to 4 parks?", "output": "SELECT city FROM park GROUP BY city HAVING count(*) BETWEEN 2 AND 4;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Which cities have 2 to 4 parks?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3708, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the cities that have 2 to 4 parks.", "output": "SELECT city FROM park GROUP BY city HAVING count(*) BETWEEN 2 AND 4;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Find all the cities that have 2 to 4 parks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3709, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which park had most attendances in 2008?", "output": "SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Which park had most attendances in 2008?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "baseball_1", "id": 3710, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which park did the most people attend in 2008?", "output": "SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Which park did the most people attend in 2008?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "mountain_photos", "id": 3711, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many camera lenses have a focal length longer than 15 mm?", "output": "SELECT count(*) FROM camera_lens WHERE focal_length_mm > 15", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many camera lenses have a focal length longer than 15 mm?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "mountain_photos", "id": 3712, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the brand and name for each camera lens, and sort in descending order of maximum aperture.", "output": "SELECT brand , name FROM camera_lens ORDER BY max_aperture DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the brand and name for each camera lens, and sort in descending order of maximum aperture.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "mountain_photos", "id": 3713, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the id, color scheme, and name for all the photos.", "output": "SELECT id , color , name FROM photos", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the id, color scheme, and name for all the photos.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "mountain_photos", "id": 3714, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum and average height of the mountains?", "output": "SELECT max(height) , avg(height) FROM mountain", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum and average height of the mountains?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "mountain_photos", "id": 3715, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average prominence of the mountains in country 'Morocco'?", "output": "SELECT avg(prominence) FROM mountain WHERE country = 'Morocco'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the average prominence of the mountains in country 'Morocco'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "mountain_photos", "id": 3716, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'?", "output": "SELECT name , height , prominence FROM mountain WHERE range != 'Aberdare Range'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "mountain_photos", "id": 3717, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the id and name of the photos for mountains?", "output": "SELECT T1.id , T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.height > 4000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the id and name of the photos for mountains?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "mountain_photos", "id": 3718, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the id and name of the mountains that have at least 2 photos?", "output": "SELECT T1.id , T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id GROUP BY T1.id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the id and name of the mountains that have at least 2 photos?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "mountain_photos", "id": 3719, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the cameras that have taken picture of the most mountains?", "output": "SELECT T2.name FROM photos AS T1 JOIN camera_lens AS T2 ON T1.camera_lens_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the cameras that have taken picture of the most mountains?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "mountain_photos", "id": 3720, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'?", "output": "SELECT T1.name FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "mountain_photos", "id": 3721, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different kinds of lens brands are there?", "output": "SELECT count(DISTINCT brand) FROM camera_lens", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different kinds of lens brands are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "mountain_photos", "id": 3722, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many camera lenses are not used in taking any photos?", "output": "SELECT count(*) FROM camera_lens WHERE id NOT IN ( SELECT camera_lens_id FROM photos )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many camera lenses are not used in taking any photos?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "mountain_photos", "id": 3723, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'?", "output": "SELECT count(DISTINCT T2.camera_lens_id) FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.country = 'Ethiopia'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "mountain_photos", "id": 3724, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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'", "output": "SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Toubkal Atlas' INTERSECT SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Lasta Massif'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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',\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "mountain_photos", "id": 3725, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'.", "output": "SELECT name , prominence FROM mountain EXCEPT SELECT T1.name , T1.prominence FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T3.brand = 'Sigma'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "mountain_photos", "id": 3726, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the camera lens names containing substring \"Digital\".", "output": "SELECT name FROM camera_lens WHERE name LIKE \"%Digital%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the camera lens names containing substring \"Digital\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "mountain_photos", "id": 3727, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos.", "output": "SELECT T1.name , count(*) FROM camera_lens AS T1 JOIN photos AS T2 ON T1.id = T2.camera_lens_id GROUP BY T1.id ORDER BY count(*)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3728, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of channels that are not owned by CCTV.", "output": "SELECT name FROM channel WHERE OWNER != 'CCTV'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of channels that are not owned by CCTV.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3729, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which channels are not owned by CCTV? Give me the channel names.", "output": "SELECT name FROM channel WHERE OWNER != 'CCTV'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which channels are not owned by CCTV? Give me the channel names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3730, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all channel names ordered by their rating in percent from big to small.", "output": "SELECT name FROM channel ORDER BY rating_in_percent DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all channel names ordered by their rating in percent from big to small.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3731, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me a list of all the channel names sorted by the channel rating in descending order.", "output": "SELECT name FROM channel ORDER BY rating_in_percent DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me a list of all the channel names sorted by the channel rating in descending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3732, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the owner of the channel that has the highest rating ratio?", "output": "SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the owner of the channel that has the highest rating ratio?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3733, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show me the owner of the channel with the highest rating.", "output": "SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show me the owner of the channel with the highest rating.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3734, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "how many programs are there?", "output": "SELECT count(*) FROM program", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: how many programs are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3735, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of programs.", "output": "SELECT count(*) FROM program", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of programs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3736, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "list all the names of programs, ordering by launch time.", "output": "SELECT name FROM program ORDER BY launch", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: list all the names of programs, ordering by launch time.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3737, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the list of program names, sorted by the order of launch date?", "output": "SELECT name FROM program ORDER BY launch", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the list of program names, sorted by the order of launch date?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3738, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name, origin and owner of each program.", "output": "SELECT name , origin , OWNER FROM program", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name, origin and owner of each program.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3739, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name, origin and owner of each program?", "output": "SELECT name , origin , OWNER FROM program", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name, origin and owner of each program?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3740, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the name of the program that was launched most recently.", "output": "SELECT name FROM program ORDER BY launch DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: find the name of the program that was launched most recently.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3741, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which program was launched most recently? Return the program name.", "output": "SELECT name FROM program ORDER BY launch DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which program was launched most recently? Return the program name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3742, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the total percentage share of all channels owned by CCTV.", "output": "SELECT sum(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: find the total percentage share of all channels owned by CCTV.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3743, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total share (in percent) of all the channels owned by CCTV?", "output": "SELECT sum(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total share (in percent) of all the channels owned by CCTV?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3744, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the channels that are broadcast in the morning.", "output": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the channels that are broadcast in the morning.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3745, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which channels are broadcast in the morning? Give me the channel names.", "output": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which channels are broadcast in the morning? Give me the channel names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3746, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what are the names of the channels that broadcast in both morning and night?", "output": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what are the names of the channels that broadcast in both morning and night?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3747, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which channels broadcast both in the morning and at night? Give me the channel names.", "output": "SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Night'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which channels broadcast both in the morning and at night? Give me the channel names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3748, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "how many programs are broadcast in each time section of the day?", "output": "SELECT count(*) , time_of_day FROM broadcast GROUP BY time_of_day", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: how many programs are broadcast in each time section of the day?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3749, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of programs broadcast for each time section of a day.", "output": "SELECT count(*) , time_of_day FROM broadcast GROUP BY time_of_day", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of programs broadcast for each time section of a day.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3750, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the number of different programs that are broadcast during night time.", "output": "SELECT count(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: find the number of different programs that are broadcast during night time.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3751, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct programs are broadcast at \"Night\" time?", "output": "SELECT count(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct programs are broadcast at \"Night\" time?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3752, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of programs that are never broadcasted in the morning.", "output": "SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Morning\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of programs that are never broadcasted in the morning.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3753, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which programs are never broadcasted in the morning? Give me the names of the programs.", "output": "SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Morning\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which programs are never broadcasted in the morning? Give me the names of the programs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3754, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the program owners that have some programs in both morning and night time.", "output": "SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Morning\" INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Night\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: find the program owners that have some programs in both morning and night time.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3755, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the owners of the programs that broadcast both in the morning and at night?", "output": "SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Morning\" INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id WHERE t2.Time_of_day = \"Night\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who are the owners of the programs that broadcast both in the morning and at night?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3756, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all program origins in the alphabetical order.", "output": "SELECT origin FROM program ORDER BY origin", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all program origins in the alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3757, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the list of program origins ordered alphabetically?", "output": "SELECT origin FROM program ORDER BY origin", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the list of program origins ordered alphabetically?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3758, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what is the number of different channel owners?", "output": "SELECT count(DISTINCT OWNER) FROM channel", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what is the number of different channel owners?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3759, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of distinct channel owners.", "output": "SELECT count(DISTINCT OWNER) FROM channel", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of distinct channel owners.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3760, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the names of programs whose origin is not in Beijing.", "output": "SELECT name FROM program WHERE origin != 'Beijing'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: find the names of programs whose origin is not in Beijing.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3761, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which programs' origins are not \"Beijing\"? Give me the program names.", "output": "SELECT name FROM program WHERE origin != 'Beijing'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which programs' origins are not \"Beijing\"? Give me the program names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3762, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the channels owned by CCTV or HBS?", "output": "SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the channels owned by CCTV or HBS?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3763, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all the channels owned by either CCTV or HBS", "output": "SELECT name FROM channel WHERE OWNER = 'CCTV' OR OWNER = 'HBS'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of all the channels owned by either CCTV or HBS,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3764, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total rating ratio for each channel owner.", "output": "SELECT sum(Rating_in_percent) , OWNER FROM channel GROUP BY OWNER", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total rating ratio for each channel owner.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3765, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total rating of channel for each channel owner?", "output": "SELECT sum(Rating_in_percent) , OWNER FROM channel GROUP BY OWNER", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total rating of channel for each channel owner?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3766, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the program that is broadcast most frequently.", "output": "SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the program that is broadcast most frequently.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "program_share", "id": 3767, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which program is broadcast most frequently? Give me the program name.", "output": "SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id = t2.program_id GROUP BY t2.program_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which program is broadcast most frequently? Give me the program name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3768, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many courses are there in total?", "output": "SELECT count(*) FROM COURSES", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many courses are there in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3769, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total number of courses offered.", "output": "SELECT count(*) FROM COURSES", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total number of courses offered.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3770, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the descriptions of the courses with name \"database\"?", "output": "SELECT course_description FROM COURSES WHERE course_name = \"database\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the descriptions of the courses with name \"database\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3771, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the description for the courses named \"database\".", "output": "SELECT course_description FROM COURSES WHERE course_name = \"database\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the description for the courses named \"database\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3772, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the addresses of the course authors or tutors with personal name \"Cathrine\"", "output": "SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name\t = \"Cathrine\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the addresses of the course authors or tutors with personal name \"Cathrine\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3773, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the addresses of the course authors or tutors whose personal name is \"Cathrine\".", "output": "SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name\t = \"Cathrine\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the addresses of the course authors or tutors whose personal name is \"Cathrine\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3774, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the addresses of all the course authors or tutors.", "output": "SELECT address_line_1 FROM Course_Authors_and_Tutors", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the addresses of all the course authors or tutors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3775, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the address of each course author or tutor?", "output": "SELECT address_line_1 FROM Course_Authors_and_Tutors", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the address of each course author or tutor?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3776, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the login names and family names of course author and tutors.", "output": "SELECT login_name , family_name FROM Course_Authors_and_Tutors", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the login names and family names of course author and tutors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3777, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the login names and family names of course author and tutors?", "output": "SELECT login_name , family_name FROM Course_Authors_and_Tutors", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the login names and family names of course author and tutors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3778, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the dates of enrollment and completion of students.", "output": "SELECT date_of_enrolment , date_of_completion FROM Student_Course_Enrolment", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the dates of enrollment and completion of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3779, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the dates of enrollment and completion in record?", "output": "SELECT date_of_enrolment , date_of_completion FROM Student_Course_Enrolment", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the dates of enrollment and completion in record?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3780, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct students are enrolled in courses?", "output": "SELECT count(DISTINCT student_id) FROM Student_Course_Enrolment", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct students are enrolled in courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3781, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of distinct students enrolled in courses.", "output": "SELECT count(DISTINCT student_id) FROM Student_Course_Enrolment", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of distinct students enrolled in courses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3782, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct courses are enrolled in by students?", "output": "SELECT count(course_id) FROM Student_Course_Enrolment", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct courses are enrolled in by students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3783, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of distinct courses that have enrolled students.", "output": "SELECT count(course_id) FROM Student_Course_Enrolment", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of distinct courses that have enrolled students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3784, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the dates of the tests taken with result \"Pass\".", "output": "SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = \"Pass\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the dates of the tests taken with result \"Pass\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3785, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which tests have \"Pass\" results? Return the dates when the tests were taken.", "output": "SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = \"Pass\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which tests have \"Pass\" results? Return the dates when the tests were taken.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3786, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many tests have result \"Fail\"?", "output": "SELECT count(*) FROM Student_Tests_Taken WHERE test_result = \"Fail\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many tests have result \"Fail\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3787, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of tests with \"Fail\" result.", "output": "SELECT count(*) FROM Student_Tests_Taken WHERE test_result = \"Fail\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of tests with \"Fail\" result.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3788, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the login names of the students with family name \"Ward\"?", "output": "SELECT login_name FROM Students WHERE family_name = \"Ward\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the login names of the students with family name \"Ward\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3789, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the login names of the students whose family name is \"Ward\".", "output": "SELECT login_name FROM Students WHERE family_name = \"Ward\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the login names of the students whose family name is \"Ward\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3790, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the dates of the latest logon of the students with family name \"Jaskolski\" or \"Langosh\"?", "output": "SELECT date_of_latest_logon FROM Students WHERE family_name = \"Jaskolski\" OR family_name = \"Langosh\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the dates of the latest logon of the students with family name \"Jaskolski\" or \"Langosh\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3791, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the latest logon date of the students whose family name is \"Jaskolski\" or \"Langosh\".", "output": "SELECT date_of_latest_logon FROM Students WHERE family_name = \"Jaskolski\" OR family_name = \"Langosh\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the latest logon date of the students whose family name is \"Jaskolski\" or \"Langosh\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3792, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students have personal names that contain the word \"son\"?", "output": "SELECT COUNT(*) FROM Students WHERE personal_name LIKE \"%son%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students have personal names that contain the word \"son\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3793, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of students who have the word \"son\" in their personal names.", "output": "SELECT COUNT(*) FROM Students WHERE personal_name LIKE \"%son%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of students who have the word \"son\" in their personal names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3794, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the subject names.", "output": "SELECT subject_name FROM SUBJECTS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the subject names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3795, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the subjects.", "output": "SELECT subject_name FROM SUBJECTS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the subjects.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3796, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the information about course authors and tutors in alphabetical order of the personal name.", "output": "SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the information about course authors and tutors in alphabetical order of the personal name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3797, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Sort the information about course authors and tutors in alphabetical order of the personal name.", "output": "SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Sort the information about course authors and tutors in alphabetical order of the personal name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3798, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the personal names and family names of all the students in alphabetical order of family name.", "output": "SELECT personal_name , family_name FROM Students ORDER BY family_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the personal names and family names of all the students in alphabetical order of family name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3799, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the personal names and family names of the students? Sort the result in alphabetical order of the family name.", "output": "SELECT personal_name , family_name FROM Students ORDER BY family_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the personal names and family names of the students? Sort the result in alphabetical order of the family name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3800, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List each test result and its count in descending order of count.", "output": "SELECT test_result , COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List each test result and its count in descending order of count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3801, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each distinct test result, find the number of students who got the result.", "output": "SELECT test_result , COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each distinct test result, find the number of students who got the result.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3802, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the login name of the course author that teaches the course with name \"advanced database\".", "output": "SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = \"advanced database\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the login name of the course author that teaches the course with name \"advanced database\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3803, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which course author teaches the \"advanced database\" course? Give me his or her login name.", "output": "SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = \"advanced database\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which course author teaches the \"advanced database\" course? Give me his or her login name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3804, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the addresses of the course authors who teach the course with name \"operating system\" or \"data structure\".", "output": "SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = \"operating system\" OR T2.course_name = \"data structure\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the addresses of the course authors who teach the course with name \"operating system\" or \"data structure\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3805, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the addresses of the course authors who teach either \"operating system\" or \"data structure\" course.", "output": "SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = \"operating system\" OR T2.course_name = \"data structure\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the addresses of the course authors who teach either \"operating system\" or \"data structure\" course.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3806, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the personal name, family name, and author ID of the course author that teaches the most courses.", "output": "SELECT T1.personal_name , T1.family_name , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the personal name, family name, and author ID of the course author that teaches the most courses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3807, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the personal name, family name, and author ID of the course author who teaches the most courses?", "output": "SELECT T1.personal_name , T1.family_name , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the personal name, family name, and author ID of the course author who teaches the most courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3808, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the addresses and author IDs of the course authors that teach at least two courses.", "output": "SELECT T1.address_line_1 , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING Count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the addresses and author IDs of the course authors that teach at least two courses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3809, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which course authors teach two or more courses? Give me their addresses and author IDs.", "output": "SELECT T1.address_line_1 , T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING Count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which course authors teach two or more courses? Give me their addresses and author IDs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3810, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of courses taught by the tutor who has personal name \"Julio\".", "output": "SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = \"Julio\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of courses taught by the tutor who has personal name \"Julio\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3811, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the courses taught by the tutor whose personal name is \"Julio\"?", "output": "SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = \"Julio\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the courses taught by the tutor whose personal name is \"Julio\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3812, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names and descriptions of courses that belong to the subject named \"Computer Science\".", "output": "SELECT T1.course_name , T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = \"Computer Science\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names and descriptions of courses that belong to the subject named \"Computer Science\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3813, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and descriptions of the all courses under the \"Computer Science\" subject?", "output": "SELECT T1.course_name , T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = \"Computer Science\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and descriptions of the all courses under the \"Computer Science\" subject?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3814, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the subject ID, subject name, and the corresponding number of available courses for each subject.", "output": "SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the subject ID, subject name, and the corresponding number of available courses for each subject.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3815, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the subject ID, subject name, and the number of available courses for each subject?", "output": "SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the subject ID, subject name, and the number of available courses for each subject?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3816, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3817, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the subject ID, name of subject and the number of courses available for each subject in ascending order of the course counts.", "output": "SELECT T1.subject_id , T2.subject_name , COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the subject ID, name of subject and the number of courses available for each subject in ascending order of the course counts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3818, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the date of enrollment of the course named \"Spanish\"?", "output": "SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"Spanish\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the date of enrollment of the course named \"Spanish\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3819, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the the date of enrollment of the \"Spanish\" course.", "output": "SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = \"Spanish\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the the date of enrollment of the \"Spanish\" course.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3820, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the course that has the most student enrollment?", "output": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the course that has the most student enrollment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3821, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which course is enrolled in by the most students? Give me the course name.", "output": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which course is enrolled in by the most students? Give me the course name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3822, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the courses that have exactly 1 student enrollment?", "output": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the courses that have exactly 1 student enrollment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3823, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the courses that have just one student enrollment.", "output": "SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the courses that have just one student enrollment.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3824, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the descriptions and names of the courses that have student enrollment bigger than 2?", "output": "SELECT T1.course_description , T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the descriptions and names of the courses that have student enrollment bigger than 2?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3825, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the descriptions and names of the courses that have more than two students enrolled in.", "output": "SELECT T1.course_description , T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the descriptions and names of the courses that have more than two students enrolled in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3826, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of each course and the corresponding number of student enrollment?", "output": "SELECT T1.course_name , COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of each course and the corresponding number of student enrollment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3827, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name and the number of enrolled student for each course.", "output": "SELECT T1.course_name , COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name and the number of enrolled student for each course.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3828, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the enrollment dates of all the tests that have result \"Pass\"?", "output": "SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = \"Pass\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the enrollment dates of all the tests that have result \"Pass\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3829, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the enrollment date for all the tests that have \"Pass\" result.", "output": "SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = \"Pass\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the enrollment date for all the tests that have \"Pass\" result.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3830, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the completion dates of all the tests that have result \"Fail\"?", "output": "SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = \"Fail\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the completion dates of all the tests that have result \"Fail\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3831, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the completion date for all the tests that have \"Fail\" result.", "output": "SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = \"Fail\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the completion date for all the tests that have \"Fail\" result.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3832, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the dates of enrollment and completion of the student with personal name \"Karson\".", "output": "SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = \"Karson\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the dates of enrollment and completion of the student with personal name \"Karson\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3833, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "On what dates did the student whose personal name is \"Karson\" enroll in and complete the courses?", "output": "SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = \"Karson\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: On what dates did the student whose personal name is \"Karson\" enroll in and complete the courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3834, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the dates of enrollment and completion of the student with family name \"Zieme\" and personal name \"Bernie\".", "output": "SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = \"Zieme\" AND T2.personal_name = \"Bernie\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the dates of enrollment and completion of the student with family name \"Zieme\" and personal name \"Bernie\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3835, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "On what dates did the student with family name \"Zieme\" and personal name \"Bernie\" enroll in and complete the courses?", "output": "SELECT T1.date_of_enrolment , T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.family_name = \"Zieme\" AND T2.personal_name = \"Bernie\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: On what dates did the student with family name \"Zieme\" and personal name \"Bernie\" enroll in and complete the courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3836, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the student ID and login name of the student with the most course enrollments", "output": "SELECT T1.student_id , T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the student ID and login name of the student with the most course enrollments,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3837, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the student ID and login name of the student who are enrolled in the most courses?", "output": "SELECT T1.student_id , T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the student ID and login name of the student who are enrolled in the most courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3838, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the student ID and personal name of the student with at least two enrollments.", "output": "SELECT T1.student_id , T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the student ID and personal name of the student with at least two enrollments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3839, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which student are enrolled in at least two courses? Give me the student ID and personal name.", "output": "SELECT T1.student_id , T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which student are enrolled in at least two courses? Give me the student ID and personal name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3840, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the student ID and middle name for all the students with at most two enrollments.", "output": "SELECT T1.student_id , T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) <= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the student ID and middle name for all the students with at most two enrollments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3841, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the student IDs and middle names of the students enrolled in at most two courses?", "output": "SELECT T1.student_id , T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) <= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the student IDs and middle names of the students enrolled in at most two courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3842, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the personal names of students not enrolled in any course.", "output": "SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the personal names of students not enrolled in any course.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3843, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which students not enrolled in any course? Find their personal names.", "output": "SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id = T2.student_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which students not enrolled in any course? Find their personal names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3844, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students did not have any course enrollment?", "output": "SELECT count(*) FROM Students WHERE student_id NOT IN (SELECT student_id FROM Student_Course_Enrolment)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students did not have any course enrollment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3845, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of students who did not enroll in any course.", "output": "SELECT count(*) FROM Students WHERE student_id NOT IN (SELECT student_id FROM Student_Course_Enrolment)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of students who did not enroll in any course.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3846, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the common login name of course authors and students.", "output": "SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the common login name of course authors and students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3847, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the login names used both by some course authors and some students?", "output": "SELECT login_name FROM Course_Authors_and_Tutors INTERSECT SELECT login_name FROM Students", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the login names used both by some course authors and some students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3848, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the common personal name of course authors and students.", "output": "SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the common personal name of course authors and students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_learning", "id": 3849, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the personal names used both by some course authors and some students?", "output": "SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the personal names used both by some course authors and some students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3850, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which claims caused more than 2 settlements or have the maximum claim value? List the date the claim was made and the claim id.", "output": "SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING count(*) > 2 UNION SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = ( SELECT max(Amount_Claimed) FROM Claims )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which claims caused more than 2 settlements or have the maximum claim value? List the date the claim was made and the claim id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3851, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.Claim_id HAVING count(*) > 2 UNION SELECT T1.Date_Claim_Made , T1.Claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id WHERE T1.Amount_Claimed = ( SELECT max(Amount_Claimed) FROM Claims )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3852, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customer had at least 2 policies but did not file any claims? List the customer details and id.", "output": "SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2 EXCEPT SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id JOIN Claims AS T3 ON T2.policy_id = T3.policy_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customer had at least 2 policies but did not file any claims? List the customer details and id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3853, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the the customer details and id for the customers who had two or more policies but did not file any claims.", "output": "SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 2 EXCEPT SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.customer_id JOIN Claims AS T3 ON T2.policy_id = T3.policy_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the the customer details and id for the customers who had two or more policies but did not file any claims.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3854, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the method, date and amount of all the payments, in ascending order of date.", "output": "SELECT Payment_Method_Code , Date_Payment_Made , Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the method, date and amount of all the payments, in ascending order of date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3855, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the method, date and amount of each payment? Sort the list in ascending order of date.", "output": "SELECT Payment_Method_Code , Date_Payment_Made , Amount_Payment FROM Payments ORDER BY Date_Payment_Made ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the method, date and amount of each payment? Sort the list in ascending order of date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3856, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3857, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the settlement amount of the claim with the largest claim amount. Show both the settlement amount and claim amount.", "output": "SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the settlement amount of the claim with the largest claim amount. Show both the settlement amount and claim amount.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3858, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3859, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the claimed amount in the claim with the least amount settled. Show both the settlement amount and claim amount.", "output": "SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the claimed amount in the claim with the least amount settled. Show both the settlement amount and claim amount.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3860, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT Date_Claim_Made , Date_Claim_Settled FROM Claims WHERE Amount_Claimed > ( SELECT avg(Amount_Claimed) FROM Claims )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3861, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the claim date, settlement date for all the claims whose claimed amount is larger than the average.", "output": "SELECT Date_Claim_Made , Date_Claim_Settled FROM Claims WHERE Amount_Claimed > ( SELECT avg(Amount_Claimed) FROM Claims )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the claim date, settlement date for all the claims whose claimed amount is larger than the average.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3862, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date.", "output": "SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= ( SELECT avg(Amount_Settled) FROM Claims )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3863, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the claim start date for the claims whose claimed amount is no more than the average", "output": "SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled <= ( SELECT avg(Amount_Settled) FROM Claims )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the claim start date for the claims whose claimed amount is no more than the average,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3864, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many settlements does each claim correspond to? List the claim id and the number of settlements.", "output": "SELECT T1.Claim_id , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many settlements does each claim correspond to? List the claim id and the number of settlements.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3865, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of settlements each claim corresponds to. Show the number together with the claim id.", "output": "SELECT T1.Claim_id , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of settlements each claim corresponds to. Show the number together with the claim id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3866, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which claim incurred the most number of settlements? List the claim id, the date the claim was made, and the number.", "output": "SELECT T1.claim_id , T1.date_claim_made , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which claim incurred the most number of settlements? List the claim id, the date the claim was made, and the number.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3867, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the claim id and claim date of the claim that incurred the most settlement count. Also tell me the count.", "output": "SELECT T1.claim_id , T1.date_claim_made , count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the claim id and claim date of the claim that incurred the most settlement count. Also tell me the count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3868, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many settlements were made on the claim with the most recent claim settlement date? List the number and the claim id.", "output": "SELECT count(*) , T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY T1.Date_Claim_Settled DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many settlements were made on the claim with the most recent claim settlement date? List the number and the claim id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3869, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the claim id and the number of settlements made for the claim with the most recent settlement date.", "output": "SELECT count(*) , T1.claim_id FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id = T2.claim_id GROUP BY T1.claim_id ORDER BY T1.Date_Claim_Settled DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the claim id and the number of settlements made for the claim with the most recent settlement date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3870, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Of all the claims, what was the earliest date when any claim was made?", "output": "SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Of all the claims, what was the earliest date when any claim was made?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3871, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Tell me the the date when the first claim was made.", "output": "SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Tell me the the date when the first claim was made.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3872, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total amount of settlement made for all the settlements?", "output": "SELECT sum(Amount_Settled) FROM Settlements", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total amount of settlement made for all the settlements?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3873, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Compute the total amount of settlement across all the settlements.", "output": "SELECT sum(Amount_Settled) FROM Settlements", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Compute the total amount of settlement across all the settlements.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3874, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the customers that had more than 1 policy? List the customer details and id.", "output": "SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.customer_id HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who are the customers that had more than 1 policy? List the customer details and id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3875, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the the customer details and id for the customers who had more than one policy.", "output": "SELECT T1.customer_details , T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.customer_id HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the the customer details and id for the customers who had more than one policy.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3876, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the claim dates and settlement dates of all the settlements?", "output": "SELECT Date_Claim_Made , Date_Claim_Settled FROM Settlements", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the claim dates and settlement dates of all the settlements?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3877, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Tell me the the claim date and settlement date for each settlement case.", "output": "SELECT Date_Claim_Made , Date_Claim_Settled FROM Settlements", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Tell me the the claim date and settlement date for each settlement case.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3878, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most popular payment method?", "output": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most popular payment method?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3879, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which payment method is used the most often?", "output": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which payment method is used the most often?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3880, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "With which kind of payment method were the least number of payments processed?", "output": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: With which kind of payment method were the least number of payments processed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3881, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the payment method that were used the least often?", "output": "SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the payment method that were used the least often?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3882, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total amount of payment?", "output": "SELECT sum(Amount_Payment) FROM Payments", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total amount of payment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3883, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Compute the total amount of payment processed.", "output": "SELECT sum(Amount_Payment) FROM Payments", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Compute the total amount of payment processed.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3884, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the distinct details of the customers?", "output": "SELECT DISTINCT customer_details FROM Customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the distinct details of the customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3885, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the distinct customer details.", "output": "SELECT DISTINCT customer_details FROM Customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the distinct customer details.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3886, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which kind of policy type was chosen by the most customers?", "output": "SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which kind of policy type was chosen by the most customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3887, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the policy type the most customers choose.", "output": "SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the policy type the most customers choose.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3888, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many settlements are there in total?", "output": "SELECT count(*) FROM Settlements", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many settlements are there in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3889, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the total number of settlements made.", "output": "SELECT count(*) FROM Settlements", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the total number of settlements made.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3890, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which Payments were processed with Visa? List the payment Id, the date and the amount.", "output": "SELECT Payment_ID , Date_Payment_Made , Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which Payments were processed with Visa? List the payment Id, the date and the amount.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3891, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the payment Id, the date and the amount for all the payments processed with Visa.", "output": "SELECT Payment_ID , Date_Payment_Made , Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the payment Id, the date and the amount for all the payments processed with Visa.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3892, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the details of the customers who do not have any policies.", "output": "SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the details of the customers who do not have any policies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3893, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customers do not have any policies? Find the details of these customers.", "output": "SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customers do not have any policies? Find the details of these customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3894, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T1.claim_id , T1.date_claim_made , T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id HAVING count(*) = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3895, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T1.claim_id , T1.date_claim_made , T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id HAVING count(*) = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3896, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total claimed amount of all the claims.", "output": "SELECT sum(Amount_Claimed) FROM Claims", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total claimed amount of all the claims.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "insurance_policies", "id": 3897, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is total amount claimed summed across all the claims?", "output": "SELECT sum(Amount_Claimed) FROM Claims", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is total amount claimed summed across all the claims?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3898, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which department has the largest number of employees?", "output": "SELECT name FROM department GROUP BY departmentID ORDER BY count(departmentID) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which department has the largest number of employees?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3899, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the department with the most employees.", "output": "SELECT name FROM department GROUP BY departmentID ORDER BY count(departmentID) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the department with the most employees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3900, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the employee id of the head whose department has the least number of employees?", "output": "SELECT head FROM department GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the employee id of the head whose department has the least number of employees?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3901, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Tell me the employee id of the head of the department with the least employees.", "output": "SELECT head FROM department GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Tell me the employee id of the head of the department with the least employees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3902, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what is the name and position of the head whose department has least number of employees?", "output": "SELECT T2.name , T2.position FROM department AS T1 JOIN physician AS T2 ON T1.head = T2.EmployeeID GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what is the name and position of the head whose department has least number of employees?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3903, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and position of the head of the department with the least employees.", "output": "SELECT T2.name , T2.position FROM department AS T1 JOIN physician AS T2 ON T1.head = T2.EmployeeID GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and position of the head of the department with the least employees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3904, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are names of patients who made an appointment?", "output": "SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are names of patients who made an appointment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3905, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of patients who have made appointments.", "output": "SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of patients who have made appointments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3906, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what are name and phone number of patients who had more than one appointment?", "output": "SELECT name , phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what are name and phone number of patients who had more than one appointment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3907, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which patients made more than one appointment? Tell me the name and phone number of these patients.", "output": "SELECT name , phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which patients made more than one appointment? Tell me the name and phone number of these patients.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3908, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of the appointment with the most recent start date?", "output": "SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id of the appointment with the most recent start date?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3909, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the appointment that started most recently?", "output": "SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the appointment that started most recently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3910, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of physicians who took some appointment.", "output": "SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of physicians who took some appointment.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3911, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the physicians who took appointments.", "output": "SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the physicians who took appointments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3912, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of physicians who never took any appointment.", "output": "SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of physicians who never took any appointment.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3913, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which physicians have never taken any appointment? Find their names.", "output": "SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which physicians have never taken any appointment? Find their names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3914, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all physicians and their primary affiliated departments' names.", "output": "SELECT T1.name , T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T2.PrimaryAffiliation = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all physicians and their primary affiliated departments' names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3915, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and primarily affiliated department name of each physician?", "output": "SELECT T1.name , T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T2.PrimaryAffiliation = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name and primarily affiliated department name of each physician?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3916, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the patient who made the most recent appointment?", "output": "SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the patient who made the most recent appointment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3917, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the patient who made the appointment with the most recent start date.", "output": "SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the patient who made the appointment with the most recent start date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3918, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many patients stay in room 112?", "output": "SELECT count(patient) FROM stay WHERE room = 112", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many patients stay in room 112?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3919, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of patients who stayed in room 112.", "output": "SELECT count(patient) FROM stay WHERE room = 112", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of patients who stayed in room 112.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3920, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many patients' prescriptions are made by physician John Dorian?", "output": "SELECT count(T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN = T2.patient JOIN physician AS T3 ON T2.physician = T3.employeeid WHERE T3.name = \"John Dorian\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many patients' prescriptions are made by physician John Dorian?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3921, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of patients' prescriptions physician John Dorian made.", "output": "SELECT count(T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN = T2.patient JOIN physician AS T3 ON T2.physician = T3.employeeid WHERE T3.name = \"John Dorian\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of patients' prescriptions physician John Dorian made.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3922, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of medication used on the patient who stays in room 111?", "output": "SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of medication used on the patient who stays in room 111?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3923, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the medication used for the patient staying in room 111?", "output": "SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the medication used for the patient staying in room 111?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3924, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the patient who most recently stayed in room 111.", "output": "SELECT patient FROM stay WHERE room = 111 ORDER BY staystart DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the patient who most recently stayed in room 111.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3925, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the patient who stayed in room 111 most recently?", "output": "SELECT patient FROM stay WHERE room = 111 ORDER BY staystart DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the patient who stayed in room 111 most recently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3926, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the nurse has the most appointments?", "output": "SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid = T2.prepnurse GROUP BY T1.employeeid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the nurse has the most appointments?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3927, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the nurse who has the largest number of appointments.", "output": "SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid = T2.prepnurse GROUP BY T1.employeeid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the nurse who has the largest number of appointments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3928, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many patients do each physician take care of? List their names and number of patients they take care of.", "output": "SELECT T1.name , count(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many patients do each physician take care of? List their names and number of patients they take care of.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3929, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name of each physician and the number of patients he or she treats.", "output": "SELECT T1.name , count(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the name of each physician and the number of patients he or she treats.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3930, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of physicians who are in charge of more than one patient.", "output": "SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of physicians who are in charge of more than one patient.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3931, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which physicians are in charge of more than one patient? Give me their names.", "output": "SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which physicians are in charge of more than one patient? Give me their names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3932, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of rooms located on each block floor.", "output": "SELECT count(*) , T1.blockfloor FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockfloor", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of rooms located on each block floor.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3933, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many rooms does each block floor have?", "output": "SELECT count(*) , T1.blockfloor FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockfloor", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many rooms does each block floor have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3934, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of rooms for different block code?", "output": "SELECT count(*) , T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockcode", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of rooms for different block code?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3935, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many rooms are located for each block code?", "output": "SELECT count(*) , T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockcode", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many rooms are located for each block code?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3936, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the unique block codes that have available rooms?", "output": "SELECT DISTINCT blockcode FROM room WHERE unavailable = 0", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the unique block codes that have available rooms?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3937, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Tell me the distinct block codes where some rooms are available.", "output": "SELECT DISTINCT blockcode FROM room WHERE unavailable = 0", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Tell me the distinct block codes where some rooms are available.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3938, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different types of rooms are there?", "output": "SELECT count(DISTINCT roomtype) FROM room", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different types of rooms are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3939, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of distinct room types available.", "output": "SELECT count(DISTINCT roomtype) FROM room", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of distinct room types available.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3940, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the names of the physicians who prescribe medication Thesisin?", "output": "SELECT DISTINCT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.name = \"Thesisin\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the names of the physicians who prescribe medication Thesisin?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3941, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all the physicians who prescribe Thesisin as medication.", "output": "SELECT DISTINCT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.name = \"Thesisin\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of all the physicians who prescribe Thesisin as medication.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3942, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and position of physicians who prescribe some medication whose brand is X?", "output": "SELECT DISTINCT T1.name , T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand = \"X\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and position of physicians who prescribe some medication whose brand is X?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3943, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which physicians prescribe a medication of brand X? Tell me the name and position of those physicians.", "output": "SELECT DISTINCT T1.name , T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand = \"X\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which physicians prescribe a medication of brand X? Tell me the name and position of those physicians.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3944, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of medications prescribed for each brand.", "output": "SELECT count(*) , T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of medications prescribed for each brand.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3945, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many medications are prescribed for each brand?", "output": "SELECT count(*) , T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many medications are prescribed for each brand?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3946, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of physicians whose position title contains the word 'senior'.", "output": "SELECT name FROM physician WHERE POSITION LIKE '%senior%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of physicians whose position title contains the word 'senior'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3947, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the physicians who have 'senior' in their titles.", "output": "SELECT name FROM physician WHERE POSITION LIKE '%senior%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the physicians who have 'senior' in their titles.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3948, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the patient who has the most recent undergoing treatment?", "output": "SELECT patient FROM undergoes ORDER BY dateundergoes LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the patient who has the most recent undergoing treatment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3949, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which patient is undergoing the most recent treatment?", "output": "SELECT patient FROM undergoes ORDER BY dateundergoes LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which patient is undergoing the most recent treatment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3950, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all patients who have an undergoing treatment and are staying in room 111.", "output": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay = T3.StayID WHERE T3.room = 111", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all patients who have an undergoing treatment and are staying in room 111.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3951, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of patients who are staying in room 111 and have an undergoing treatment?", "output": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay = T3.StayID WHERE T3.room = 111", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of patients who are staying in room 111 and have an undergoing treatment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3952, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all distinct nurses ordered by alphabetical order?", "output": "SELECT DISTINCT name FROM nurse ORDER BY name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of all distinct nurses ordered by alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3953, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the alphabetically ordered list of all the distinct names of nurses?", "output": "SELECT DISTINCT name FROM nurse ORDER BY name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the alphabetically ordered list of all the distinct names of nurses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3954, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of nurses who are nursing an undergoing treatment.", "output": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse = T2.EmployeeID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of nurses who are nursing an undergoing treatment.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3955, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which nurses are in charge of patients undergoing treatments?", "output": "SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN nurse AS T2 ON T1.AssistingNurse = T2.EmployeeID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which nurses are in charge of patients undergoing treatments?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3956, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all distinct medications, ordered in an alphabetical order.", "output": "SELECT DISTINCT name FROM medication ORDER BY name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of all distinct medications, ordered in an alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3957, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the alphabetically ordered list of all distinct medications?", "output": "SELECT DISTINCT name FROM medication ORDER BY name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the alphabetically ordered list of all distinct medications?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3958, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the physician who prescribed the highest dose?", "output": "SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the physician who prescribed the highest dose?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3959, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the physician who prescribed the highest dose. What is his or her name?", "output": "SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the physician who prescribed the highest dose. What is his or her name?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3960, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the physicians' employee ids together with their primary affiliation departments' ids.", "output": "SELECT physician , department FROM affiliated_with WHERE primaryaffiliation = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the physicians' employee ids together with their primary affiliation departments' ids.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3961, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are each physician's employee id and department id primarily affiliated.", "output": "SELECT physician , department FROM affiliated_with WHERE primaryaffiliation = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are each physician's employee id and department id primarily affiliated.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3962, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of departments where some physicians are primarily affiliated with.", "output": "SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of departments where some physicians are primarily affiliated with.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3963, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of departments that have primarily affiliated physicians.", "output": "SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of departments that have primarily affiliated physicians.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3964, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What nurses are on call with block floor 1 and block code 1? Tell me their names.", "output": "SELECT nurse FROM on_call WHERE blockfloor = 1 AND blockcode = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What nurses are on call with block floor 1 and block code 1? Tell me their names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3965, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the ids of the nurses who are on call in block floor 1 and block code 1.", "output": "SELECT nurse FROM on_call WHERE blockfloor = 1 AND blockcode = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the ids of the nurses who are on call in block floor 1 and block code 1.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3966, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the highest cost, lowest cost and average cost of procedures?", "output": "SELECT MAX(cost) , MIN(cost) , AVG(cost) FROM procedures", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the highest cost, lowest cost and average cost of procedures?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3967, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Tell me the highest, lowest, and average cost of procedures.", "output": "SELECT MAX(cost) , MIN(cost) , AVG(cost) FROM procedures", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Tell me the highest, lowest, and average cost of procedures.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3968, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name and cost of all procedures sorted by the cost from the highest to the lowest.", "output": "SELECT name , cost FROM procedures ORDER BY cost DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name and cost of all procedures sorted by the cost from the highest to the lowest.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3969, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Sort the list of names and costs of all procedures in the descending order of cost.", "output": "SELECT name , cost FROM procedures ORDER BY cost DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Sort the list of names and costs of all procedures in the descending order of cost.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3970, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the three most expensive procedures.", "output": "SELECT name FROM procedures ORDER BY cost LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the three most expensive procedures.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3971, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the three most costly procedures?", "output": "SELECT name FROM procedures ORDER BY cost LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the three most costly procedures?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3972, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the physicians who are trained in a procedure that costs more than 5000.", "output": "SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T3.cost > 5000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the physicians who are trained in a procedure that costs more than 5000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3973, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which physicians are trained in procedures that are more expensive than 5000?", "output": "SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T3.cost > 5000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which physicians are trained in procedures that are more expensive than 5000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3974, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the physician who was trained in the most expensive procedure?", "output": "SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment ORDER BY T3.cost DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the physician who was trained in the most expensive procedure?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3975, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which physician was trained in the procedure that costs the most.", "output": "SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment ORDER BY T3.cost DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which physician was trained in the procedure that costs the most.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3976, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average cost of procedures that physician John Wen was trained in?", "output": "SELECT avg(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average cost of procedures that physician John Wen was trained in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3977, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Compute the mean price of procedures physician John Wen was trained in.", "output": "SELECT avg(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Compute the mean price of procedures physician John Wen was trained in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3978, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of procedures which physician John Wen was trained in.", "output": "SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of procedures which physician John Wen was trained in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3979, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of procedures physician John Wen was trained in?", "output": "SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of procedures physician John Wen was trained in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3980, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all procedures which cost more than 1000 or which physician John Wen was trained in.", "output": "SELECT name FROM procedures WHERE cost > 1000 UNION SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all procedures which cost more than 1000 or which physician John Wen was trained in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3981, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the procedures that cost more than 1000 or are specialized in by physician John Wen?", "output": "SELECT name FROM procedures WHERE cost > 1000 UNION SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the procedures that cost more than 1000 or are specialized in by physician John Wen?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3982, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all procedures which cost more than 1000 but which physician John Wen was not trained in?", "output": "SELECT name FROM procedures WHERE cost > 1000 EXCEPT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all procedures which cost more than 1000 but which physician John Wen was not trained in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3983, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Among the procedures that cost more than 1000, which were not specialized in by physician John Wen?", "output": "SELECT name FROM procedures WHERE cost > 1000 EXCEPT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Among the procedures that cost more than 1000, which were not specialized in by physician John Wen?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3984, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in.", "output": "SELECT name FROM procedures WHERE cost < 5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3985, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What procedures cost less than 5000 and have John Wen as a trained physician?", "output": "SELECT name FROM procedures WHERE cost < 5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = \"John Wen\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What procedures cost less than 5000 and have John Wen as a trained physician?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3986, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of physicians who are affiliated with both Surgery and Psychiatry departments.", "output": "SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Psychiatry'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of physicians who are affiliated with both Surgery and Psychiatry departments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3987, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which physicians are affiliated with both Surgery and Psychiatry departments? Tell me their names.", "output": "SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Psychiatry'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which physicians are affiliated with both Surgery and Psychiatry departments? Tell me their names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3988, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of physicians who are affiliated with Surgery or Psychiatry department.", "output": "SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' OR T3.name = 'Psychiatry'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of physicians who are affiliated with Surgery or Psychiatry department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3989, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which physicians are affiliated with either Surgery or Psychiatry department? Give me their names.", "output": "SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' OR T3.name = 'Psychiatry'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which physicians are affiliated with either Surgery or Psychiatry department? Give me their names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3990, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of patients who are not using the medication of Procrastin-X.", "output": "SELECT name FROM patient EXCEPT SELECT T1.name FROM patient AS T1 JOIN Prescribes AS T2 ON T2.Patient = T1.SSN JOIN Medication AS T3 ON T2.Medication = T3.Code WHERE T3.name = 'Procrastin-X'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of patients who are not using the medication of Procrastin-X.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3991, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of patients who are not taking the medication of Procrastin-X.", "output": "SELECT name FROM patient EXCEPT SELECT T1.name FROM patient AS T1 JOIN Prescribes AS T2 ON T2.Patient = T1.SSN JOIN Medication AS T3 ON T2.Medication = T3.Code WHERE T3.name = 'Procrastin-X'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of patients who are not taking the medication of Procrastin-X.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3992, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of patients who are not using the medication of Procrastin-X.", "output": "SELECT count(*) FROM patient WHERE SSN NOT IN ( SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X' )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of patients who are not using the medication of Procrastin-X.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3993, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many patients are not using Procrastin-X as medication?", "output": "SELECT count(*) FROM patient WHERE SSN NOT IN ( SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication = T2.Code WHERE T2.name = 'Procrastin-X' )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many patients are not using Procrastin-X as medication?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3994, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many appointments are there?", "output": "SELECT count(*) FROM appointment", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many appointments are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3995, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count how many appointments have been made in total.", "output": "SELECT count(*) FROM appointment", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count how many appointments have been made in total.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3996, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of nurses who are on call.", "output": "SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of nurses who are on call.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "hospital_1", "id": 3997, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct names of nurses on call?", "output": "SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct names of nurses on call?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 3998, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many ships are there?", "output": "SELECT count(*) FROM ship", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: How many ships are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 3999, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of ships?", "output": "SELECT count(*) FROM ship", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: What is the number of ships?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4000, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of ships in ascending order of tonnage.", "output": "SELECT Name FROM ship ORDER BY Tonnage ASC", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: List the name of ships in ascending order of tonnage.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4001, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what are the names of the ships ordered by ascending tonnage?", "output": "SELECT Name FROM ship ORDER BY Tonnage ASC", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: what are the names of the ships ordered by ascending tonnage?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4002, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the type and nationality of ships?", "output": "SELECT TYPE , Nationality FROM ship", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: What are the type and nationality of ships?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4003, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the types and nationalities of every ship?", "output": "SELECT TYPE , Nationality FROM ship", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: What are the types and nationalities of every ship?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4004, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of ships whose nationality is not \"United States\".", "output": "SELECT Name FROM ship WHERE Nationality != \"United States\"", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: List the name of ships whose nationality is not \"United States\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4005, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the ships that are not from the United States?", "output": "SELECT Name FROM ship WHERE Nationality != \"United States\"", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: What are the names of the ships that are not from the United States?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4006, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of ships whose nationality is either United States or United Kingdom.", "output": "SELECT Name FROM ship WHERE Nationality = \"United States\" OR Nationality = \"United Kingdom\"", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: Show the name of ships whose nationality is either United States or United Kingdom.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4007, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the ships that are from either the US or the UK?", "output": "SELECT Name FROM ship WHERE Nationality = \"United States\" OR Nationality = \"United Kingdom\"", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: What are the names of the ships that are from either the US or the UK?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4008, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the ship with the largest tonnage?", "output": "SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: What is the name of the ship with the largest tonnage?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4009, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the ship with the largest amount of tonnage called?", "output": "SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: What is the ship with the largest amount of tonnage called?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4010, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show different types of ships and the number of ships of each type.", "output": "SELECT TYPE , COUNT(*) FROM ship GROUP BY TYPE", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: Show different types of ships and the number of ships of each type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4011, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each type, how many ships are there?", "output": "SELECT TYPE , COUNT(*) FROM ship GROUP BY TYPE", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: For each type, how many ships are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4012, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the most common type of ships.", "output": "SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: Please show the most common type of ships.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4013, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most common type of ships?", "output": "SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: What is the most common type of ships?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4014, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the nations that have more than two ships.", "output": "SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: List the nations that have more than two ships.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4015, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the nations that have more than two ships?", "output": "SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: What are the nations that have more than two ships?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4016, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show different types of ships and the average tonnage of ships of each type.", "output": "SELECT TYPE , avg(Tonnage) FROM ship GROUP BY TYPE", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: Show different types of ships and the average tonnage of ships of each type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4017, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each type, what is the average tonnage?", "output": "SELECT TYPE , avg(Tonnage) FROM ship GROUP BY TYPE", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: For each type, what is the average tonnage?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4018, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show codes and fates of missions, and names of ships involved.", "output": "SELECT T1.Code , T1.Fate , T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: Show codes and fates of missions, and names of ships involved.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4019, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the mission codes, fates, and names of the ships involved?", "output": "SELECT T1.Code , T1.Fate , T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: What are the mission codes, fates, and names of the ships involved?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4020, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names of ships involved in a mission launched after 1928.", "output": "SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: Show names of ships involved in a mission launched after 1928.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4021, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of ships that were involved in a mission launched after 1928?", "output": "SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: What are the names of ships that were involved in a mission launched after 1928?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4022, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the distinct fate of missions that involve ships with nationality \"United States\"", "output": "SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = \"United States\"", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: Show the distinct fate of missions that involve ships with nationality \"United States\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4023, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different fates of the mission that involved ships from the United States?", "output": "SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = \"United States\"", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: What are the different fates of the mission that involved ships from the United States?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4024, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of ships that are not involved in any mission", "output": "SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission)", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: List the name of ships that are not involved in any mission,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4025, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the ships that are not involved in any missions?", "output": "SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission)", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: What are the names of the ships that are not involved in any missions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4026, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000.", "output": "SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_mission", "id": 4027, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the types of the ships that have both shiips with tonnage more than 6000 and those with tonnage less than 4000?", "output": "SELECT TYPE FROM ship WHERE Tonnage > 6000 INTERSECT SELECT TYPE FROM ship WHERE Tonnage < 4000", "input": "Based on \n# the table&column(database schema) information {'mission': ['Mission_ID', 'Ship_ID', 'Code', 'Launched_Year', 'Location', 'Speed_knots', 'Fate'], 'ship': ['Ship_ID', 'Name', 'Type', 'Nationality', 'Tonnage']} and \n# the user question: What are the types of the ships that have both shiips with tonnage more than 6000 and those with tonnage less than 4000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4028, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of students in total.", "output": "SELECT count(*) FROM list", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the number of students in total.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4029, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are there?", "output": "SELECT count(*) FROM list", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: How many students are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4030, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last names of students studying in room 111.", "output": "SELECT lastname FROM list WHERE classroom = 111", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the last names of students studying in room 111.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4031, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the last names of students in room 111?", "output": "SELECT lastname FROM list WHERE classroom = 111", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: What are the last names of students in room 111?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4032, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of students studying in room 108.", "output": "SELECT firstname FROM list WHERE classroom = 108", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the first names of students studying in room 108.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4033, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of students in room 108?", "output": "SELECT firstname FROM list WHERE classroom = 108", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: What are the first names of students in room 108?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4034, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of students studying in room 107?", "output": "SELECT DISTINCT firstname FROM list WHERE classroom = 107", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: What are the first names of students studying in room 107?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4035, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the first names of all the students in room 107.", "output": "SELECT DISTINCT firstname FROM list WHERE classroom = 107", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: List the first names of all the students in room 107.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4036, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each classroom report the grade that is taught in it. Report just the classroom number and the grade number.", "output": "SELECT DISTINCT classroom , grade FROM list", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: For each classroom report the grade that is taught in it. Report just the classroom number and the grade number.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4037, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the grade number and classroom number of each class in the list?", "output": "SELECT DISTINCT classroom , grade FROM list", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: What are the grade number and classroom number of each class in the list?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4038, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which grade is studying in classroom 103?", "output": "SELECT DISTINCT grade FROM list WHERE classroom = 103", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Which grade is studying in classroom 103?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4039, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the grade taught in classroom 103.", "output": "SELECT DISTINCT grade FROM list WHERE classroom = 103", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the grade taught in classroom 103.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4040, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the grade studying in room 105.", "output": "SELECT DISTINCT grade FROM list WHERE classroom = 105", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the grade studying in room 105.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4041, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which grade is studying in room 105?", "output": "SELECT DISTINCT grade FROM list WHERE classroom = 105", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Which grade is studying in room 105?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4042, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which classrooms are used by grade 4?", "output": "SELECT DISTINCT classroom FROM list WHERE grade = 4", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Which classrooms are used by grade 4?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4043, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the classrooms in which grade 4 is studying.", "output": "SELECT DISTINCT classroom FROM list WHERE grade = 4", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the classrooms in which grade 4 is studying.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4044, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which classrooms are used by grade 5?", "output": "SELECT DISTINCT classroom FROM list WHERE grade = 5", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Which classrooms are used by grade 5?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4045, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show me the classrooms grade 5 is using.", "output": "SELECT DISTINCT classroom FROM list WHERE grade = 5", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Show me the classrooms grade 5 is using.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4046, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last names of the teachers that teach fifth grade.", "output": "SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the last names of the teachers that teach fifth grade.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4047, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what are the last names of the teachers who teach grade 5?", "output": "SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 5", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: what are the last names of the teachers who teach grade 5?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4048, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of the teachers that teach first grade.", "output": "SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the first names of the teachers that teach first grade.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4049, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of the teachers who teach grade 1?", "output": "SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: What are the first names of the teachers who teach grade 1?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4050, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of all the teachers that teach in classroom 110.", "output": "SELECT firstname FROM teachers WHERE classroom = 110", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the first names of all the teachers that teach in classroom 110.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4051, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which teachers teach in classroom 110? Give me their first names.", "output": "SELECT firstname FROM teachers WHERE classroom = 110", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Which teachers teach in classroom 110? Give me their first names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4052, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last names of teachers teaching in classroom 109.", "output": "SELECT lastname FROM teachers WHERE classroom = 109", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the last names of teachers teaching in classroom 109.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4053, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which teachers teach in classroom 109? Give me their last names.", "output": "SELECT lastname FROM teachers WHERE classroom = 109", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Which teachers teach in classroom 109? Give me their last names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4054, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Report the first name and last name of all the teachers.", "output": "SELECT DISTINCT firstname , lastname FROM teachers", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Report the first name and last name of all the teachers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4055, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first name and last name of all the teachers?", "output": "SELECT DISTINCT firstname , lastname FROM teachers", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: What are the first name and last name of all the teachers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4056, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Report the first name and last name of all the students.", "output": "SELECT DISTINCT firstname , lastname FROM list", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Report the first name and last name of all the students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4057, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show each student's first name and last name.", "output": "SELECT DISTINCT firstname , lastname FROM list", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Show each student's first name and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4058, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all students taught by OTHA MOYER. Output the first and last names of the students.", "output": "SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"OTHA\" AND T2.lastname = \"MOYER\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find all students taught by OTHA MOYER. Output the first and last names of the students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4059, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which students study under the teacher named OTHA MOYER? Give me the first and last names of the students.", "output": "SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"OTHA\" AND T2.lastname = \"MOYER\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Which students study under the teacher named OTHA MOYER? Give me the first and last names of the students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4060, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all students taught by MARROTTE KIRK. Output first and last names of students.", "output": "SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"MARROTTE\" AND T2.lastname = \"KIRK\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find all students taught by MARROTTE KIRK. Output first and last names of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4061, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which are the first and last names of the students taught by MARROTTE KIRK?", "output": "SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"MARROTTE\" AND T2.lastname = \"KIRK\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Which are the first and last names of the students taught by MARROTTE KIRK?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4062, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first and last name of all the teachers that teach EVELINA BROMLEY.", "output": "SELECT T2.firstname , T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"EVELINA\" AND T1.lastname = \"BROMLEY\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the first and last name of all the teachers that teach EVELINA BROMLEY.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4063, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which teachers teach the student named EVELINA BROMLEY? Give me the first and last name of the teachers.", "output": "SELECT T2.firstname , T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"EVELINA\" AND T1.lastname = \"BROMLEY\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Which teachers teach the student named EVELINA BROMLEY? Give me the first and last name of the teachers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4064, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last names of all the teachers that teach GELL TAMI.", "output": "SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"GELL\" AND T1.lastname = \"TAMI\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the last names of all the teachers that teach GELL TAMI.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4065, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the last names of the teachers who teach the student called GELL TAMI?", "output": "SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"GELL\" AND T1.lastname = \"TAMI\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: What are the last names of the teachers who teach the student called GELL TAMI?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4066, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students does LORIA ONDERSMA teaches?", "output": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"LORIA\" AND T2.lastname = \"ONDERSMA\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: How many students does LORIA ONDERSMA teaches?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4067, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of students the teacher LORIA ONDERSMA teaches.", "output": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"LORIA\" AND T2.lastname = \"ONDERSMA\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Count the number of students the teacher LORIA ONDERSMA teaches.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4068, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students does KAWA GORDON teaches?", "output": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"KAWA\" AND T2.lastname = \"GORDON\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: How many students does KAWA GORDON teaches?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4069, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of students taught by the teacher KAWA GORDON.", "output": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"KAWA\" AND T2.lastname = \"GORDON\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the number of students taught by the teacher KAWA GORDON.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4070, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of students taught by TARRING LEIA.", "output": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"TARRING\" AND T2.lastname = \"LEIA\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the number of students taught by TARRING LEIA.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4071, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are taught by teacher TARRING LEIA?", "output": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"TARRING\" AND T2.lastname = \"LEIA\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: How many students are taught by teacher TARRING LEIA?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4072, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many teachers does the student named CHRISSY NABOZNY have?", "output": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"CHRISSY\" AND T1.lastname = \"NABOZNY\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: How many teachers does the student named CHRISSY NABOZNY have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4073, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of teachers who teach the student called CHRISSY NABOZNY.", "output": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"CHRISSY\" AND T1.lastname = \"NABOZNY\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the number of teachers who teach the student called CHRISSY NABOZNY.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4074, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many teachers does the student named MADLOCK RAY have?", "output": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"MADLOCK\" AND T1.lastname = \"RAY\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: How many teachers does the student named MADLOCK RAY have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4075, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of teachers who teach the student called MADLOCK RAY.", "output": "SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = \"MADLOCK\" AND T1.lastname = \"RAY\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the number of teachers who teach the student called MADLOCK RAY.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4076, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names.", "output": "SELECT DISTINCT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"OTHA\" AND T2.lastname = \"MOYER\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4077, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of the first-grade students who are NOT taught by teacher OTHA MOYER?", "output": "SELECT DISTINCT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 1 EXCEPT SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = \"OTHA\" AND T2.lastname = \"MOYER\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: What are the first and last names of the first-grade students who are NOT taught by teacher OTHA MOYER?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4078, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last names of the students in third grade that are not taught by COVIN JEROME.", "output": "SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname != \"COVIN\" AND T2.lastname != \"JEROME\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the last names of the students in third grade that are not taught by COVIN JEROME.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4079, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which students in third grade are not taught by teacher COVIN JEROME? Give me the last names of the students.", "output": "SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.grade = 3 AND T2.firstname != \"COVIN\" AND T2.lastname != \"JEROME\"", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Which students in third grade are not taught by teacher COVIN JEROME? Give me the last names of the students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4080, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade.", "output": "SELECT grade , count(DISTINCT classroom) , count(*) FROM list GROUP BY grade", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4081, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT grade , count(DISTINCT classroom) , count(*) FROM list GROUP BY grade", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4082, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each classroom, report the classroom number and the number of grades using it.", "output": "SELECT classroom , count(DISTINCT grade) FROM list GROUP BY classroom", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: For each classroom, report the classroom number and the number of grades using it.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4083, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each classroom, show the classroom number and count the number of distinct grades that use the room.", "output": "SELECT classroom , count(DISTINCT grade) FROM list GROUP BY classroom", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: For each classroom, show the classroom number and count the number of distinct grades that use the room.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4084, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which classroom has the most students?", "output": "SELECT classroom FROM list GROUP BY classroom ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Which classroom has the most students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4085, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the classroom that the most students use.", "output": "SELECT classroom FROM list GROUP BY classroom ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the classroom that the most students use.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4086, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Report the number of students in each classroom.", "output": "SELECT classroom , count(*) FROM list GROUP BY classroom", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Report the number of students in each classroom.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4087, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each classroom, show the classroom number and find how many students are using it.", "output": "SELECT classroom , count(*) FROM list GROUP BY classroom", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: For each classroom, show the classroom number and find how many students are using it.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4088, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each grade 0 classroom, report the total number of students.", "output": "SELECT classroom , count(*) FROM list WHERE grade = \"0\" GROUP BY classroom", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: For each grade 0 classroom, report the total number of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4089, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each grade 0 classroom, return the classroom number and the count of students.", "output": "SELECT classroom , count(*) FROM list WHERE grade = \"0\" GROUP BY classroom", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: For each grade 0 classroom, return the classroom number and the count of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4090, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Report the total number of students for each fourth-grade classroom.", "output": "SELECT classroom , count(*) FROM list WHERE grade = \"4\" GROUP BY classroom", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Report the total number of students for each fourth-grade classroom.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4091, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each fourth-grade classroom, show the classroom number and the total number of students using it.", "output": "SELECT classroom , count(*) FROM list WHERE grade = \"4\" GROUP BY classroom", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: For each fourth-grade classroom, show the classroom number and the total number of students using it.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4092, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the teacher who teaches the largest number of students.", "output": "SELECT T2.firstname , T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom GROUP BY T2.firstname , T2.lastname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the name of the teacher who teaches the largest number of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4093, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which teacher teaches the most students? Give me the first name and last name of the teacher.", "output": "SELECT T2.firstname , T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom GROUP BY T2.firstname , T2.lastname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Which teacher teaches the most students? Give me the first name and last name of the teacher.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4094, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of students in one classroom.", "output": "SELECT count(*) , classroom FROM list GROUP BY classroom", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: Find the number of students in one classroom.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "student_1", "id": 4095, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students does one classroom have?", "output": "SELECT count(*) , classroom FROM list GROUP BY classroom", "input": "Based on \n# the table&column(database schema) information {'list': ['LastName', 'FirstName', 'Grade', 'Classroom'], 'teachers': ['LastName', 'FirstName', 'Classroom']} and \n# the user question: How many students does one classroom have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_employee", "id": 4096, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many companies are headquartered in the US?", "output": "SELECT count(*) FROM company WHERE Headquarters = 'USA'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many companies are headquartered in the US?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_employee", "id": 4097, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of companies by ascending number of sales.", "output": "SELECT Name FROM company ORDER BY Sales_in_Billion ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of companies by ascending number of sales.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_employee", "id": 4098, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the headquarters and industries of all companies?", "output": "SELECT Headquarters , Industry FROM company", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the headquarters and industries of all companies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_employee", "id": 4099, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of companies in the banking or retailing industry?", "output": "SELECT Name FROM company WHERE Industry = \"Banking\" OR Industry = \"Retailing\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of companies in the banking or retailing industry?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_employee", "id": 4100, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum and minimum market value of companies?", "output": "SELECT max(Market_Value_in_Billion) , min(Market_Value_in_Billion) FROM company", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the maximum and minimum market value of companies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_employee", "id": 4101, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the headquarter of the company with the largest sales?", "output": "SELECT Headquarters FROM company ORDER BY Sales_in_Billion DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the headquarter of the company with the largest sales?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_employee", "id": 4102, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the different headquarters and number of companies at each headquarter.", "output": "SELECT Headquarters , COUNT(*) FROM company GROUP BY Headquarters", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the different headquarters and number of companies at each headquarter.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_employee", "id": 4103, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the most common headquarter for companies.", "output": "SELECT Headquarters FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the most common headquarter for companies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_employee", "id": 4104, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the headquarters that have at least two companies.", "output": "SELECT Headquarters FROM company GROUP BY Headquarters HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the headquarters that have at least two companies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_employee", "id": 4105, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the headquarters that have both companies in banking industry and companies in oil and gas industry.", "output": "SELECT Headquarters FROM company WHERE Industry = \"Banking\" INTERSECT SELECT Headquarters FROM company WHERE Industry = \"Oil and gas\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the headquarters that have both companies in banking industry and companies in oil and gas industry.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_employee", "id": 4106, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of companies and of employees.", "output": "SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of companies and of employees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_employee", "id": 4107, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names of companies and that of employees in descending order of number of years working for that employee.", "output": "SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID ORDER BY T1.Year_working", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show names of companies and that of employees in descending order of number of years working for that employee.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_employee", "id": 4108, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of employees that work for companies with sales bigger than 200.", "output": "SELECT T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T3.Sales_in_Billion > 200", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of employees that work for companies with sales bigger than 200.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_employee", "id": 4109, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of companies and the number of employees they have", "output": "SELECT T3.Name , COUNT(*) FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID GROUP BY T3.Name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of companies and the number of employees they have,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_employee", "id": 4110, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of people that are not employed by any company", "output": "SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM employment)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of people that are not employed by any company,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_employee", "id": 4111, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "list the names of the companies with more than 200 sales in the descending order of sales and profits.", "output": "SELECT name FROM company WHERE Sales_in_Billion > 200 ORDER BY Sales_in_Billion , Profits_in_Billion DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: list the names of the companies with more than 200 sales in the descending order of sales and profits.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4112, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many film are there?", "output": "SELECT count(*) FROM film", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many film are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4113, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of films.", "output": "SELECT count(*) FROM film", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of films.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4114, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the distinct director of all films.", "output": "SELECT DISTINCT Director FROM film", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the distinct director of all films.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4115, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different film Directors?", "output": "SELECT DISTINCT Director FROM film", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different film Directors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4116, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average ticket sales gross in dollars of films?", "output": "SELECT avg(Gross_in_dollar) FROM film", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average ticket sales gross in dollars of films?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4117, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the average gross sales in dollars across all films.", "output": "SELECT avg(Gross_in_dollar) FROM film", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the average gross sales in dollars across all films.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4118, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the low and high estimates of film markets?", "output": "SELECT Low_Estimate , High_Estimate FROM film_market_estimation", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the low and high estimates of film markets?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4119, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the low and high estimates for all film markets.", "output": "SELECT Low_Estimate , High_Estimate FROM film_market_estimation", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the low and high estimates for all film markets.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4120, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the types of film market estimations in year 1995?", "output": "SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the types of film market estimations in year 1995?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4121, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the types of film market estimations in 1995.", "output": "SELECT TYPE FROM film_market_estimation WHERE YEAR = 1995", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the types of film market estimations in 1995.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4122, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum and minimum number of cities in all markets.", "output": "SELECT max(Number_cities) , min(Number_cities) FROM market", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum and minimum number of cities in all markets.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4123, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the maximum and minimum number of cities across all markets.", "output": "SELECT max(Number_cities) , min(Number_cities) FROM market", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the maximum and minimum number of cities across all markets.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4124, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many markets have number of cities smaller than 300?", "output": "SELECT count(*) FROM market WHERE Number_cities < 300", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many markets have number of cities smaller than 300?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4125, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of markets that have a number of cities lower than 300.", "output": "SELECT count(*) FROM market WHERE Number_cities < 300", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of markets that have a number of cities lower than 300.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4126, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all countries of markets in ascending alphabetical order.", "output": "SELECT Country FROM market ORDER BY Country ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all countries of markets in ascending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4127, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the countries for each market, ordered alphabetically?", "output": "SELECT Country FROM market ORDER BY Country ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the countries for each market, ordered alphabetically?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4128, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all countries of markets in descending order of number of cities.", "output": "SELECT Country FROM market ORDER BY Number_cities DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all countries of markets in descending order of number of cities.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4129, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the countries for each market ordered by decreasing number of cities?", "output": "SELECT Country FROM market ORDER BY Number_cities DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the countries for each market ordered by decreasing number of cities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4130, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the titles of films and the types of market estimations.", "output": "SELECT T1.Title , T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the titles of films and the types of market estimations.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4131, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of films and corresponding types of market estimations?", "output": "SELECT T1.Title , T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the titles of films and corresponding types of market estimations?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4132, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the distinct director of films with market estimation in the year of 1995.", "output": "SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID WHERE T2.Year = 1995", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the distinct director of films with market estimation in the year of 1995.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4133, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the different directors of films which had market estimation in 1995?", "output": "SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID WHERE T2.Year = 1995", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who are the different directors of films which had market estimation in 1995?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4134, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of cities of markets with low film market estimate bigger than 10000?", "output": "SELECT avg(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T1.Low_Estimate > 10000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average number of cities of markets with low film market estimate bigger than 10000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4135, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the average number of cities within markets that had a low market estimation larger than 10000?", "output": "SELECT avg(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T1.Low_Estimate > 10000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the average number of cities within markets that had a low market estimation larger than 10000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4136, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please list the countries and years of film market estimations.", "output": "SELECT T2.Country , T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please list the countries and years of film market estimations.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4137, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the countries of markets and their corresponding years of market estimation?", "output": "SELECT T2.Country , T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the countries of markets and their corresponding years of market estimation?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4138, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please list the years of film market estimations when the market is in country \"Japan\" in descending order.", "output": "SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T2.Country = \"Japan\" ORDER BY T1.Year DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please list the years of film market estimations when the market is in country \"Japan\" in descending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4139, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the years of film market estimation for the market of Japan, ordered by year descending?", "output": "SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T2.Country = \"Japan\" ORDER BY T1.Year DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the years of film market estimation for the market of Japan, ordered by year descending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4140, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the studios of each film and the number of films produced by that studio.", "output": "SELECT Studio , COUNT(*) FROM film GROUP BY Studio", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the studios of each film and the number of films produced by that studio.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4141, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How films are produced by each studio?", "output": "SELECT Studio , COUNT(*) FROM film GROUP BY Studio", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How films are produced by each studio?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4142, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of film studio that have the most number of films.", "output": "SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of film studio that have the most number of films.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4143, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of teh studio that created the most films?", "output": "SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of teh studio that created the most films?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4144, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of studios that have at least two films.", "output": "SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of studios that have at least two films.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4145, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of studios that have made two or more films?", "output": "SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of studios that have made two or more films?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4146, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the title of films that do not have any market estimation.", "output": "SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the title of films that do not have any market estimation.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4147, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of films that do not have a film market estimation?", "output": "SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the titles of films that do not have a film market estimation?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4148, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the studios that have produced films with director \"Nicholas Meyer\" and \"Walter Hill\".", "output": "SELECT Studio FROM film WHERE Director = \"Nicholas Meyer\" INTERSECT SELECT Studio FROM film WHERE Director = \"Walter Hill\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the studios that have produced films with director \"Nicholas Meyer\" and \"Walter Hill\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4149, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of studios that have produced films with both Nicholas Meyer and Walter Hill?", "output": "SELECT Studio FROM film WHERE Director = \"Nicholas Meyer\" INTERSECT SELECT Studio FROM film WHERE Director = \"Walter Hill\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of studios that have produced films with both Nicholas Meyer and Walter Hill?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4150, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the titles and studios of the films that are produced by some film studios that contained the word \"Universal\".", "output": "SELECT title , Studio FROM film WHERE Studio LIKE \"%Universal%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the titles and studios of the films that are produced by some film studios that contained the word \"Universal\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4151, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles and studios of films that have been produced by a studio whose name contains \"Universal\"?", "output": "SELECT title , Studio FROM film WHERE Studio LIKE \"%Universal%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the titles and studios of films that have been produced by a studio whose name contains \"Universal\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4152, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the studios that have not produced films with director \"Walter Hill\".", "output": "SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = \"Walter Hill\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the studios that have not produced films with director \"Walter Hill\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4153, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which studios have never worked with the director Walter Hill?", "output": "SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = \"Walter Hill\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which studios have never worked with the director Walter Hill?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4154, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the studios which average gross is above 4500000.", "output": "SELECT Studio FROM film GROUP BY Studio HAVING avg(Gross_in_dollar) >= 4500000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the studios which average gross is above 4500000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4155, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which studios have an average gross of over 4500000?", "output": "SELECT Studio FROM film GROUP BY Studio HAVING avg(Gross_in_dollar) >= 4500000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which studios have an average gross of over 4500000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4156, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the title of the film that has the highest high market estimation.", "output": "SELECT t1.title FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID ORDER BY high_estimate DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the title of the film that has the highest high market estimation.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4157, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the title of the film with the highest high estimate?", "output": "SELECT t1.title FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID ORDER BY high_estimate DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the title of the film with the highest high estimate?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4158, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles and directors of the films were never presented in China?", "output": "SELECT title , director FROM film WHERE film_id NOT IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the titles and directors of the films were never presented in China?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "film_rank", "id": 4159, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the titles and directors of films that were never in the market of China.", "output": "SELECT title , director FROM film WHERE film_id NOT IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the titles and directors of films that were never in the market of China.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4160, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many calendar items do we have?", "output": "SELECT count(*) FROM Ref_calendar", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many calendar items do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4161, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of all the calendar items.", "output": "SELECT count(*) FROM Ref_calendar", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of all the calendar items.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4162, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all calendar dates and day Numbers.", "output": "SELECT calendar_date , day_Number FROM Ref_calendar", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all calendar dates and day Numbers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4163, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the calendar dates and day Numbers?", "output": "SELECT calendar_date , day_Number FROM Ref_calendar", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the calendar dates and day Numbers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4164, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of document types.", "output": "SELECT count(*) FROM Ref_document_types", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of document types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4165, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many document types are there?", "output": "SELECT count(*) FROM Ref_document_types", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many document types are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4166, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all document type codes and document type names.", "output": "SELECT document_type_code , document_type_name FROM Ref_document_types", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all document type codes and document type names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4167, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the document type codes and document type names?", "output": "SELECT document_type_code , document_type_name FROM Ref_document_types", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the document type codes and document type names?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4168, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and description for document type code RV?", "output": "SELECT document_type_name , document_type_description FROM Ref_document_types WHERE document_type_code = \"RV\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and description for document type code RV?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4169, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the name and description of the document type code RV.", "output": "SELECT document_type_name , document_type_description FROM Ref_document_types WHERE document_type_code = \"RV\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the name and description of the document type code RV.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4170, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the document type code for document type \"Paper\"?", "output": "SELECT document_type_code FROM Ref_document_types WHERE document_type_name = \"Paper\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the document type code for document type \"Paper\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4171, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the code of the document type \"Paper\".", "output": "SELECT document_type_code FROM Ref_document_types WHERE document_type_name = \"Paper\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the code of the document type \"Paper\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4172, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of documents with document type code CV or BK.", "output": "SELECT count(*) FROM All_documents WHERE document_type_code = \"CV\" OR document_type_code = \"BK\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of documents with document type code CV or BK.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4173, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many documents have document type code CV or BK?", "output": "SELECT count(*) FROM All_documents WHERE document_type_code = \"CV\" OR document_type_code = \"BK\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many documents have document type code CV or BK?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4174, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the date when the document \"Marry CV\" was stored?", "output": "SELECT date_stored FROM All_documents WHERE Document_name = \"Marry CV\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the date when the document \"Marry CV\" was stored?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4175, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When was the document named \"Marry CV\" stored? Give me the date.", "output": "SELECT date_stored FROM All_documents WHERE Document_name = \"Marry CV\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When was the document named \"Marry CV\" stored? Give me the date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4176, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the day Number and date of all the documents?", "output": "SELECT T2.day_Number , T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the day Number and date of all the documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4177, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the day Number and stored date for all the documents.", "output": "SELECT T2.day_Number , T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the day Number and stored date for all the documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4178, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the document type name for the document with name \"How to read a book\"?", "output": "SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = \"How to read a book\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the document type name for the document with name \"How to read a book\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4179, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the document type name of the document named \"How to read a book\".", "output": "SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = \"How to read a book\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the document type name of the document named \"How to read a book\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4180, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of locations.", "output": "SELECT count(*) FROM Ref_locations", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of locations.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4181, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many locations are listed in the database?", "output": "SELECT count(*) FROM Ref_locations", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many locations are listed in the database?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4182, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all location codes and location names.", "output": "SELECT location_code , location_name FROM Ref_locations", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all location codes and location names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4183, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the location codes and location names?", "output": "SELECT location_code , location_name FROM Ref_locations", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the location codes and location names?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4184, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and description for location code x?", "output": "SELECT location_name , location_description FROM Ref_locations WHERE location_code = \"x\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name and description for location code x?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4185, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the name and description of the location with code x.", "output": "SELECT location_name , location_description FROM Ref_locations WHERE location_code = \"x\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the name and description of the location with code x.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4186, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the location code for the country \"Canada\"?", "output": "SELECT location_code FROM Ref_locations WHERE location_name = \"Canada\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the location code for the country \"Canada\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4187, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the location code of the country \"Canada\".", "output": "SELECT location_code FROM Ref_locations WHERE location_name = \"Canada\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the location code of the country \"Canada\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4188, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many roles are there?", "output": "SELECT count(*) FROM ROLES", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many roles are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4189, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the total number of roles listed.", "output": "SELECT count(*) FROM ROLES", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the total number of roles listed.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4190, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all role codes, role names, and role descriptions.", "output": "SELECT role_code , role_name , role_description FROM ROLES", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all role codes, role names, and role descriptions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4191, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the role codes, role names, and role descriptions?", "output": "SELECT role_code , role_name , role_description FROM ROLES", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the role codes, role names, and role descriptions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4192, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and description for role code \"MG\"?", "output": "SELECT role_name , role_description FROM ROLES WHERE role_code = \"MG\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name and description for role code \"MG\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4193, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and description of the role with code \"MG\".", "output": "SELECT role_name , role_description FROM ROLES WHERE role_code = \"MG\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and description of the role with code \"MG\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4194, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the description for role name \"Proof Reader\".", "output": "SELECT role_description FROM ROLES WHERE role_name = \"Proof Reader\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the description for role name \"Proof Reader\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4195, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description of the role named \"Proof Reader\"?", "output": "SELECT role_description FROM ROLES WHERE role_name = \"Proof Reader\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description of the role named \"Proof Reader\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4196, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many employees do we have?", "output": "SELECT count(*) FROM Employees", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many employees do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4197, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of employees we have.", "output": "SELECT count(*) FROM Employees", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of employees we have.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4198, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name, role code, and date of birth for the employee with name 'Armani'.", "output": "SELECT employee_name , role_code , date_of_birth FROM Employees WHERE employee_Name = 'Armani'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name, role code, and date of birth for the employee with name 'Armani'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4199, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name, role code, and date of birth of the employee named 'Armani'?", "output": "SELECT employee_name , role_code , date_of_birth FROM Employees WHERE employee_Name = 'Armani'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name, role code, and date of birth of the employee named 'Armani'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4200, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id for the employee called Ebba?", "output": "SELECT employee_ID FROM Employees WHERE employee_name = \"Ebba\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id for the employee called Ebba?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4201, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the id of the employee named Ebba.", "output": "SELECT employee_ID FROM Employees WHERE employee_name = \"Ebba\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the id of the employee named Ebba.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4202, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of all the employees with role \"HR\".", "output": "SELECT employee_name FROM Employees WHERE role_code = \"HR\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of all the employees with role \"HR\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4203, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which employees have the role with code \"HR\"? Find their names.", "output": "SELECT employee_name FROM Employees WHERE role_code = \"HR\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which employees have the role with code \"HR\"? Find their names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4204, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all role codes and the number of employees in each role.", "output": "SELECT role_code , count(*) FROM Employees GROUP BY role_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all role codes and the number of employees in each role.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4205, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the code of each role and the number of employees in each role?", "output": "SELECT role_code , count(*) FROM Employees GROUP BY role_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the code of each role and the number of employees in each role?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4206, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the role code with the largest number of employees?", "output": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the role code with the largest number of employees?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4207, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the code of the role that have the most employees.", "output": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the code of the role that have the most employees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4208, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all role codes with at least 3 employees.", "output": "SELECT role_code FROM Employees GROUP BY role_code HAVING count(*) >= 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all role codes with at least 3 employees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4209, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the roles with three or more employees? Give me the role codes.", "output": "SELECT role_code FROM Employees GROUP BY role_code HAVING count(*) >= 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the roles with three or more employees? Give me the role codes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4210, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the role code with the least employees.", "output": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the role code with the least employees.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4211, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the role with the smallest number of employees? Find the role codes.", "output": "SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the role with the smallest number of employees? Find the role codes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4212, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the role name and role description for employee called Ebba?", "output": "SELECT T2.role_name , T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T1.employee_name = \"Ebba\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the role name and role description for employee called Ebba?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4213, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name and description of the role played by the employee named Ebba.", "output": "SELECT T2.role_name , T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T1.employee_name = \"Ebba\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name and description of the role played by the employee named Ebba.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4214, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of employees with role name Editor.", "output": "SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = \"Editor\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of employees with role name Editor.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4215, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all the employees whose the role name is \"Editor\".", "output": "SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = \"Editor\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all the employees whose the role name is \"Editor\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4216, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the employee ids for all employees with role name \"Human Resource\" or \"Manager\".", "output": "SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = \"Human Resource\" OR T2.role_name = \"Manager\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the employee ids for all employees with role name \"Human Resource\" or \"Manager\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4217, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the employee ids of the employees whose role name is \"Human Resource\" or \"Manager\"?", "output": "SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = \"Human Resource\" OR T2.role_name = \"Manager\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the employee ids of the employees whose role name is \"Human Resource\" or \"Manager\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4218, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different location codes for documents?", "output": "SELECT DISTINCT location_code FROM Document_locations", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different location codes for documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4219, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me all the distinct location codes for documents.", "output": "SELECT DISTINCT location_code FROM Document_locations", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me all the distinct location codes for documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4220, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the location name for document \"Robin CV\".", "output": "SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = \"Robin CV\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the location name for document \"Robin CV\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4221, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the location name of the document \"Robin CV\"?", "output": "SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = \"Robin CV\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the location name of the document \"Robin CV\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4222, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the location code, the starting date and ending data in that location for all the documents.", "output": "SELECT location_code , date_in_location_from , date_in_locaton_to FROM Document_locations", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the location code, the starting date and ending data in that location for all the documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4223, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are each document's location code, and starting date and ending data in that location?", "output": "SELECT location_code , date_in_location_from , date_in_locaton_to FROM Document_locations", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are each document's location code, and starting date and ending data in that location?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4224, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is \"the date in location from\" and \"the date in location to\" for the document with name \"Robin CV\"?", "output": "SELECT T1.date_in_location_from , T1.date_in_locaton_to FROM Document_locations AS T1 JOIN All_documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = \"Robin CV\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is \"the date in location from\" and \"the date in location to\" for the document with name \"Robin CV\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4225, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the starting date and ending data in location for the document named \"Robin CV\".", "output": "SELECT T1.date_in_location_from , T1.date_in_locaton_to FROM Document_locations AS T1 JOIN All_documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = \"Robin CV\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the starting date and ending data in location for the document named \"Robin CV\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4226, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the location codes and the number of documents in each location.", "output": "SELECT location_code , count(*) FROM Document_locations GROUP BY location_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the location codes and the number of documents in each location.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4227, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the code of each location and the number of documents in that location?", "output": "SELECT location_code , count(*) FROM Document_locations GROUP BY location_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the code of each location and the number of documents in that location?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4228, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the location code with the most documents?", "output": "SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the location code with the most documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4229, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the code of the location with the largest number of documents.", "output": "SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the code of the location with the largest number of documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4230, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the location codes with at least 3 documents.", "output": "SELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*) >= 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the location codes with at least 3 documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4231, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the codes of the locations with at least three documents?", "output": "SELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*) >= 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the codes of the locations with at least three documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4232, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the location name and code with the least documents.", "output": "SELECT T2.location_name , T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code = T2.location_code GROUP BY T1.location_code ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the location name and code with the least documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4233, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and code of the location with the smallest number of documents?", "output": "SELECT T2.location_name , T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code = T2.location_code GROUP BY T1.location_code ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name and code of the location with the smallest number of documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4234, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents?", "output": "SELECT T2.employee_name , T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4235, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of the employees who authorized the destruction of documents and the employees who destroyed the corresponding documents.", "output": "SELECT T2.employee_name , T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of the employees who authorized the destruction of documents and the employees who destroyed the corresponding documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4236, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the id of each employee and the number of document destruction authorised by that employee.", "output": "SELECT Destruction_Authorised_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the id of each employee and the number of document destruction authorised by that employee.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4237, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the id of each employee and the number of document destruction authorised by that employee?", "output": "SELECT Destruction_Authorised_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the id of each employee and the number of document destruction authorised by that employee?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4238, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the employee ids and the number of documents destroyed by each employee.", "output": "SELECT Destroyed_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the employee ids and the number of documents destroyed by each employee.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4239, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the id of each employee and the number of document destroyed by that employee?", "output": "SELECT Destroyed_by_Employee_ID , count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the id of each employee and the number of document destroyed by that employee?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4240, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ids of the employees who don't authorize destruction for any document.", "output": "SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the ids of the employees who don't authorize destruction for any document.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4241, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which employees do not authorize destruction for any document? Give me their employee ids.", "output": "SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which employees do not authorize destruction for any document? Give me their employee ids.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4242, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ids of all employees who have authorized destruction.", "output": "SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the ids of all employees who have authorized destruction.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4243, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all the employees who authorize document destruction?", "output": "SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all the employees who authorize document destruction?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4244, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ids of all employees who have destroyed a document.", "output": "SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the ids of all employees who have destroyed a document.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4245, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all the employees who have destroyed documents?", "output": "SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all the employees who have destroyed documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4246, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ids of all employees who don't destroy any document.", "output": "SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the ids of all employees who don't destroy any document.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4247, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which employees do not destroy any document? Find their employee ids.", "output": "SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which employees do not destroy any document? Find their employee ids.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4248, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ids of all employees who have either destroyed a document or made an authorization to do this.", "output": "SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the ids of all employees who have either destroyed a document or made an authorization to do this.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Doc_Tracking_DB", "id": 4249, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which employees have either destroyed a document or made an authorization to do so? Return their employee ids.", "output": "SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which employees have either destroyed a document or made an authorization to do so? Return their employee ids.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4250, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many clubs are there?", "output": "SELECT count(*) FROM club", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: How many clubs are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4251, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the total number of clubs.", "output": "SELECT count(*) FROM club", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Count the total number of clubs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4252, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all clubs?", "output": "SELECT clubname FROM club", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: What are the names of all clubs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4253, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the name of each club.", "output": "SELECT clubname FROM club", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Give me the name of each club.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4254, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are there?", "output": "SELECT count(*) FROM student", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: How many students are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4255, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the total number of students.", "output": "SELECT count(*) FROM student", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Count the total number of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4256, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all the students?", "output": "SELECT DISTINCT fname FROM student", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: What are the first names of all the students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4257, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find each student's first name.", "output": "SELECT DISTINCT fname FROM student", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find each student's first name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4258, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last names of the members of the club \"Bootup Baltimore\".", "output": "SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find the last names of the members of the club \"Bootup Baltimore\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4259, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the members of the club named \"Bootup Baltimore\"? Give me their last names.", "output": "SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Who are the members of the club named \"Bootup Baltimore\"? Give me their last names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4260, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the members of the club named \"Hopkins Student Enterprises\"? Show the last name.", "output": "SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Hopkins Student Enterprises\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Who are the members of the club named \"Hopkins Student Enterprises\"? Show the last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4261, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the last name for the members of the club named \"Hopkins Student Enterprises\".", "output": "SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Hopkins Student Enterprises\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Return the last name for the members of the club named \"Hopkins Student Enterprises\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4262, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many members does the club \"Tennis Club\" has?", "output": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Tennis Club\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: How many members does the club \"Tennis Club\" has?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4263, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the members of the club \"Tennis Club\".", "output": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Tennis Club\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Count the members of the club \"Tennis Club\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4264, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of members of club \"Pen and Paper Gaming\".", "output": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Pen and Paper Gaming\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find the number of members of club \"Pen and Paper Gaming\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4265, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many people have membership in the club \"Pen and Paper Gaming\"?", "output": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Pen and Paper Gaming\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: How many people have membership in the club \"Pen and Paper Gaming\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4266, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many clubs does \"Linda Smith\" belong to?", "output": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Linda\" AND t3.lname = \"Smith\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: How many clubs does \"Linda Smith\" belong to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4267, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many clubs does \"Linda Smith\" have membership for?", "output": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Linda\" AND t3.lname = \"Smith\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: How many clubs does \"Linda Smith\" have membership for?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4268, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of clubs where \"Tracy Kim\" is a member.", "output": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Tracy\" AND t3.lname = \"Kim\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find the number of clubs where \"Tracy Kim\" is a member.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4269, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For how many clubs is \"Tracy Kim\" a member?", "output": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Tracy\" AND t3.lname = \"Kim\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: For how many clubs is \"Tracy Kim\" a member?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4270, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the female members of club \"Bootup Baltimore\". Show the first name and last name.", "output": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.sex = \"F\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find all the female members of club \"Bootup Baltimore\". Show the first name and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4271, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the first name and last name for all the female members of the club \"Bootup Baltimore\".", "output": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.sex = \"F\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Give me the first name and last name for all the female members of the club \"Bootup Baltimore\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4272, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the male members of club \"Hopkins Student Enterprises\". Show the first name and last name.", "output": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Hopkins Student Enterprises\" AND t3.sex = \"M\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find all the male members of club \"Hopkins Student Enterprises\". Show the first name and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4273, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first name and last name of each male member in club \"Hopkins Student Enterprises\"?", "output": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Hopkins Student Enterprises\" AND t3.sex = \"M\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: What are the first name and last name of each male member in club \"Hopkins Student Enterprises\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4274, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all members of \"Bootup Baltimore\" whose major is \"600\". Show the first name and last name.", "output": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.major = \"600\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find all members of \"Bootup Baltimore\" whose major is \"600\". Show the first name and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4275, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which members of \"Bootup Baltimore\" major in \"600\"? Give me their first names and last names.", "output": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.major = \"600\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Which members of \"Bootup Baltimore\" major in \"600\"? Give me their first names and last names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4276, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which club has the most members majoring in \"600\"?", "output": "SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.major = \"600\" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Which club has the most members majoring in \"600\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4277, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the club which has the largest number of members majoring in \"600\".", "output": "SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.major = \"600\" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find the club which has the largest number of members majoring in \"600\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4278, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the club that has the most female students.", "output": "SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.sex = \"F\" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find the name of the club that has the most female students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4279, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which club has the most female students as their members? Give me the name of the club.", "output": "SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.sex = \"F\" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Which club has the most female students as their members? Give me the name of the club.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4280, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description of the club named \"Tennis Club\"?", "output": "SELECT clubdesc FROM club WHERE clubname = \"Tennis Club\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: What is the description of the club named \"Tennis Club\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4281, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the description of the club called \"Tennis Club\".", "output": "SELECT clubdesc FROM club WHERE clubname = \"Tennis Club\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find the description of the club called \"Tennis Club\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4282, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the description of the club \"Pen and Paper Gaming\".", "output": "SELECT clubdesc FROM club WHERE clubname = \"Pen and Paper Gaming\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find the description of the club \"Pen and Paper Gaming\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4283, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description of the club \"Pen and Paper Gaming\"?", "output": "SELECT clubdesc FROM club WHERE clubname = \"Pen and Paper Gaming\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: What is the description of the club \"Pen and Paper Gaming\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4284, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the location of the club named \"Tennis Club\"?", "output": "SELECT clublocation FROM club WHERE clubname = \"Tennis Club\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: What is the location of the club named \"Tennis Club\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4285, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Where us the club named \"Tennis Club\" located?", "output": "SELECT clublocation FROM club WHERE clubname = \"Tennis Club\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Where us the club named \"Tennis Club\" located?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4286, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the location of the club \"Pen and Paper Gaming\".", "output": "SELECT clublocation FROM club WHERE clubname = \"Pen and Paper Gaming\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find the location of the club \"Pen and Paper Gaming\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4287, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Where is the club \"Pen and Paper Gaming\" located?", "output": "SELECT clublocation FROM club WHERE clubname = \"Pen and Paper Gaming\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Where is the club \"Pen and Paper Gaming\" located?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4288, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Where is the club \"Hopkins Student Enterprises\" located?", "output": "SELECT clublocation FROM club WHERE clubname = \"Hopkins Student Enterprises\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Where is the club \"Hopkins Student Enterprises\" located?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4289, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Tell me the location of the club \"Hopkins Student Enterprises\".", "output": "SELECT clublocation FROM club WHERE clubname = \"Hopkins Student Enterprises\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Tell me the location of the club \"Hopkins Student Enterprises\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4290, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of all the clubs at \"AKW\".", "output": "SELECT clubname FROM club WHERE clublocation = \"AKW\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find the name of all the clubs at \"AKW\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4291, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which clubs are located at \"AKW\"? Return the club names.", "output": "SELECT clubname FROM club WHERE clublocation = \"AKW\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Which clubs are located at \"AKW\"? Return the club names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4292, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many clubs are located at \"HHH\"?", "output": "SELECT count(*) FROM club WHERE clublocation = \"HHH\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: How many clubs are located at \"HHH\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4293, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of clubs located at \"HHH\".", "output": "SELECT count(*) FROM club WHERE clublocation = \"HHH\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Count the number of clubs located at \"HHH\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4294, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last name of the president of the club \"Bootup Baltimore\"?", "output": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t2.position = \"President\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: What are the first and last name of the president of the club \"Bootup Baltimore\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4295, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the president of the club \"Bootup Baltimore\"? Give me the first and last name.", "output": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t2.position = \"President\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Who is the president of the club \"Bootup Baltimore\"? Give me the first and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4296, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the \"CTO\" of club \"Hopkins Student Enterprises\"? Show the first name and last name.", "output": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Hopkins Student Enterprises\" AND t2.position = \"CTO\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Who is the \"CTO\" of club \"Hopkins Student Enterprises\"? Show the first name and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4297, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name and last name for the \"CTO\" of the club \"Hopkins Student Enterprises\"?", "output": "SELECT t3.fname , t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Hopkins Student Enterprises\" AND t2.position = \"CTO\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find the first name and last name for the \"CTO\" of the club \"Hopkins Student Enterprises\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4298, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different roles are there in the club \"Bootup Baltimore\"?", "output": "SELECT count(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = \"Bootup Baltimore\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: How many different roles are there in the club \"Bootup Baltimore\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4299, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different positions in the club \"Bootup Baltimore\".", "output": "SELECT count(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = \"Bootup Baltimore\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Count the number of different positions in the club \"Bootup Baltimore\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4300, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many members of \"Bootup Baltimore\" are older than 18?", "output": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.age > 18", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: How many members of \"Bootup Baltimore\" are older than 18?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4301, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of members in club \"Bootup Baltimore\" whose age is above 18.", "output": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.age > 18", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Count the number of members in club \"Bootup Baltimore\" whose age is above 18.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4302, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many members of club \"Bootup Baltimore\" are younger than 18?", "output": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.age < 18", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: How many members of club \"Bootup Baltimore\" are younger than 18?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4303, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of members in club \"Bootup Baltimore\" whose age is below 18.", "output": "SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\" AND t3.age < 18", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Count the number of members in club \"Bootup Baltimore\" whose age is below 18.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4304, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all the clubs that have at least a member from the city with city code \"BAL\".", "output": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = \"BAL\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find the names of all the clubs that have at least a member from the city with city code \"BAL\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4305, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which clubs have one or more members from the city with code \"BAL\"? Give me the names of the clubs.", "output": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = \"BAL\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Which clubs have one or more members from the city with code \"BAL\"? Give me the names of the clubs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4306, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the clubs that have at least a member from the city with city code \"HOU\".", "output": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = \"HOU\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find the names of the clubs that have at least a member from the city with city code \"HOU\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4307, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which clubs have one or more members from the city with code \"HOU\"? Give me the names of the clubs.", "output": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = \"HOU\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Which clubs have one or more members from the city with code \"HOU\"? Give me the names of the clubs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4308, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many clubs does the student named \"Eric Tai\" belong to?", "output": "SELECT count(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Eric\" AND t3.lname = \"Tai\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: How many clubs does the student named \"Eric Tai\" belong to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4309, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of clubs for which the student named \"Eric Tai\" is a member.", "output": "SELECT count(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Eric\" AND t3.lname = \"Tai\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Count the number of clubs for which the student named \"Eric Tai\" is a member.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4310, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the clubs having \"Davis Steven\" as a member.", "output": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Davis\" AND t3.lname = \"Steven\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: List the clubs having \"Davis Steven\" as a member.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4311, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the clubs that have \"Davis Steven\" as a member?", "output": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = \"Davis\" AND t3.lname = \"Steven\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: What are the names of the clubs that have \"Davis Steven\" as a member?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4312, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the clubs that have at least a member with advisor \"1121\".", "output": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: List the clubs that have at least a member with advisor \"1121\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4313, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which clubs have one or more members whose advisor is \"1121\"?", "output": "SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Which clubs have one or more members whose advisor is \"1121\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4314, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average age of the members of the club \"Bootup Baltimore\"?", "output": "SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: What is the average age of the members of the club \"Bootup Baltimore\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4315, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average age of the members in the club \"Bootup Baltimore\".", "output": "SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Bootup Baltimore\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find the average age of the members in the club \"Bootup Baltimore\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4316, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average age of members of the club \"Hopkins Student Enterprises\".", "output": "SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Hopkins Student Enterprises\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Find the average age of members of the club \"Hopkins Student Enterprises\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4317, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "On average, how old are the members in the club \"Hopkins Student Enterprises\"?", "output": "SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Hopkins Student Enterprises\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: On average, how old are the members in the club \"Hopkins Student Enterprises\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4318, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Retrieve the average age of members of the club \"Tennis Club\".", "output": "SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Tennis Club\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Retrieve the average age of members of the club \"Tennis Club\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "club_1", "id": 4319, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Compute the average age of the members in the club \"Tennis Club\".", "output": "SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = \"Tennis Club\"", "input": "Based on \n# the table&column(database schema) information {'Student': ['StuID', 'LName', 'Fname', 'Age', 'Sex', 'Major', 'Advisor', 'city_code'], 'Club': ['ClubID', 'ClubName', 'ClubDesc', 'ClubLocation'], 'Member_of_club': ['StuID', 'ClubID', 'Position']} and \n# the user question: Compute the average age of the members in the club \"Tennis Club\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4320, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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'?", "output": "SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4321, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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'?", "output": "SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4322, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the project details of the project both producing patent and paper as outcomes.", "output": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the project details of the project both producing patent and paper as outcomes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4323, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details of the project that is producing both patents and papers as outcomes?", "output": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details of the project that is producing both patents and papers as outcomes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4324, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total grant amount of the organisations described as research?", "output": "SELECT sum(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total grant amount of the organisations described as research?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4325, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total amount of grant money for research?", "output": "SELECT sum(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total amount of grant money for research?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4326, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List from which date and to which date these staff work: project staff of the project which hires the most staffs", "output": "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'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List from which date and to which date these staff work: project staff of the project which hires the most staffs,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4327, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "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'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4328, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the organisation ids and details of the organisations which are involved in", "output": "SELECT T2.organisation_id , T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING sum(T1.grant_amount) > 6000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the organisation ids and details of the organisations which are involved in,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4329, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and details for all organizations that have grants of more than 6000 dollars?", "output": "SELECT T2.organisation_id , T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING sum(T1.grant_amount) > 6000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids and details for all organizations that have grants of more than 6000 dollars?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4330, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the organisation type and id of the organisation which has the most number of research staff?", "output": "SELECT T1.organisation_type , T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the organisation type and id of the organisation which has the most number of research staff?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4331, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the type and id of the organization that has the most research staff?", "output": "SELECT T1.organisation_type , T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the type and id of the organization that has the most research staff?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4332, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which organisation type hires most research staff?", "output": "SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which organisation type hires most research staff?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4333, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the type of the organization with the most research staff?", "output": "SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the type of the organization with the most research staff?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4334, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find out the send dates of the documents with the grant amount of more than 5000 were granted by organisation type described", "output": "SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find out the send dates of the documents with the grant amount of more than 5000 were granted by organisation type described,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4335, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the send dates for all documents that have a grant amount of more than 5000 and are involved in research?", "output": "SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the send dates for all documents that have a grant amount of more than 5000 and are involved in research?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4336, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the response received dates for the documents described as 'Regular' or granted with more than 100?", "output": "SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the response received dates for the documents described as 'Regular' or granted with more than 100?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4337, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the response received date for the document described as Regular that was granted more than 100 dollars?", "output": "SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the response received date for the document described as Regular that was granted more than 100 dollars?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4338, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the project details of the projects which did not hire any staff for a researcher role.", "output": "SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code = 'researcher' )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the project details of the projects which did not hire any staff for a researcher role.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4339, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details for all projects that did not hire any staff in a research role?", "output": "SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code = 'researcher' )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details for all projects that did not hire any staff in a research role?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4340, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes?", "output": "SELECT T1.task_details , T1.task_id , T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details , T1.task_id , T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4341, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the task details, task ids, and project ids for the progrects that are detailed as 'omnis' or have at least 3 outcomes?", "output": "SELECT T1.task_details , T1.task_id , T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details , T1.task_id , T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the task details, task ids, and project ids for the progrects that are detailed as 'omnis' or have at least 3 outcomes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4342, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When do all the researcher role staff start to work, and when do they stop working?", "output": "SELECT date_from , date_to FROM Project_Staff WHERE role_code = 'researcher'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When do all the researcher role staff start to work, and when do they stop working?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4343, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When did researchers start and stop working?", "output": "SELECT date_from , date_to FROM Project_Staff WHERE role_code = 'researcher'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When did researchers start and stop working?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4344, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many kinds of roles are there for the staff?", "output": "SELECT count(DISTINCT role_code) FROM Project_Staff", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many kinds of roles are there for the staff?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4345, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different roles are there on the project staff?", "output": "SELECT count(DISTINCT role_code) FROM Project_Staff", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different roles are there on the project staff?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4346, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total amount of grants given by each organisations? Also list the organisation id.", "output": "SELECT sum(grant_amount) , organisation_id FROM Grants GROUP BY organisation_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total amount of grants given by each organisations? Also list the organisation id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4347, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total amount of grant money given to each organization and what is its id?", "output": "SELECT sum(grant_amount) , organisation_id FROM Grants GROUP BY organisation_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total amount of grant money given to each organization and what is its id?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4348, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the project details of the projects with the research outcome described with the substring 'Published'.", "output": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the project details of the projects with the research outcome described with the substring 'Published'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4349, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details for the project whose research has been published?", "output": "SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details for the project whose research has been published?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4350, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many staff does each project has? List the project id and the number in an ascending order.", "output": "SELECT T1.project_id , count(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many staff does each project has? List the project id and the number in an ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4351, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each project id, how many staff does it have? List them in increasing order.", "output": "SELECT T1.project_id , count(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each project id, how many staff does it have? List them in increasing order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4352, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the complete description of the researcher role.", "output": "SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the complete description of the researcher role.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4353, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the complete description of the job of a researcher?", "output": "SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the complete description of the job of a researcher?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4354, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When did the first staff for the projects started working?", "output": "SELECT date_from FROM Project_Staff ORDER BY date_from ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When did the first staff for the projects started working?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4355, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When did the first staff member start working?", "output": "SELECT date_from FROM Project_Staff ORDER BY date_from ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When did the first staff member start working?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4356, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which project made the most number of outcomes? List the project details and the project id.", "output": "SELECT T1.project_details , T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which project made the most number of outcomes? List the project details and the project id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4357, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details and id of the project with the most outcomes?", "output": "SELECT T1.project_details , T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details and id of the project with the most outcomes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4358, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which projects have no outcome? List the project details.", "output": "SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which projects have no outcome? List the project details.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4359, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details of the project with no outcomes?", "output": "SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details of the project with no outcomes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4360, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which organisation hired the most number of research staff? List the organisation id, type and detail.", "output": "SELECT T1.organisation_id , T1.organisation_type , T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which organisation hired the most number of research staff? List the organisation id, type and detail.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4361, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids, types, and details of the organization with the most research staff?", "output": "SELECT T1.organisation_id , T1.organisation_type , T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids, types, and details of the organization with the most research staff?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4362, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the role description and the id of the project staff involved in most number of project outcomes?", "output": "SELECT T1.role_description , T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the role description and the id of the project staff involved in most number of project outcomes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4363, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each staff id, what is the description of the role that is involved with the most number of projects?", "output": "SELECT T1.role_description , T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each staff id, what is the description of the role that is involved with the most number of projects?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4364, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which document type is described with the prefix 'Initial'?", "output": "SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which document type is described with the prefix 'Initial'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4365, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the type of the document whose description starts with the word 'Initial'?", "output": "SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the type of the document whose description starts with the word 'Initial'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4366, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date.", "output": "SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Initial Application'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4367, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For grants that have descriptions of Regular and Initial Applications, what are their start dates?", "output": "SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code = T3.document_type_code WHERE T3.document_description = 'Initial Application'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For grants that have descriptions of Regular and Initial Applications, what are their start dates?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4368, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many documents can one grant have at most? List the grant id and number.", "output": "SELECT grant_id , count(*) FROM Documents GROUP BY grant_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many documents can one grant have at most? List the grant id and number.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4369, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each grant id, how many documents does it have, and which one has the most?", "output": "SELECT grant_id , count(*) FROM Documents GROUP BY grant_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each grant id, how many documents does it have, and which one has the most?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4370, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the organisation type description of the organisation detailed as 'quo'.", "output": "SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_details = 'quo'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the organisation type description of the organisation detailed as 'quo'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4371, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the type description of the organization whose detail is listed as 'quo'?", "output": "SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_details = 'quo'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the type description of the organization whose detail is listed as 'quo'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4372, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order.", "output": "SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4373, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details of all organizations that are described as Sponsors and sort the results in ascending order?", "output": "SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details of all organizations that are described as Sponsors and sort the results in ascending order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4374, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many Patent outcomes are generated from all the projects?", "output": "SELECT count(*) FROM Project_outcomes WHERE outcome_code = 'Patent'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many Patent outcomes are generated from all the projects?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4375, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many patents outcomes were listed for all the projects?", "output": "SELECT count(*) FROM Project_outcomes WHERE outcome_code = 'Patent'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many patents outcomes were listed for all the projects?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4376, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many project staff worked as leaders or started working before '1989-04-24 23:51:54'?", "output": "SELECT count(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many project staff worked as leaders or started working before '1989-04-24 23:51:54'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4377, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many project members were leaders or started working before '1989-04-24 23:51:54'?", "output": "SELECT count(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many project members were leaders or started working before '1989-04-24 23:51:54'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4378, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last date of the staff leaving the projects?", "output": "SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the last date of the staff leaving the projects?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4379, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last date that a staff member left a project?", "output": "SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the last date that a staff member left a project?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4380, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the result description of the project whose detail is 'sint'?", "output": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the result description of the project whose detail is 'sint'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4381, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description for the results whose project detail is 'sint'?", "output": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description for the results whose project detail is 'sint'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4382, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the organisation id with the maximum outcome count, and the count.", "output": "SELECT T1.organisation_id , count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the organisation id with the maximum outcome count, and the count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4383, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the organization with the maximum number of outcomes and how many outcomes are there?", "output": "SELECT T1.organisation_id , count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the organization with the maximum number of outcomes and how many outcomes are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4384, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the project details of the projects launched by the organisation", "output": "SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) DESC LIMIT 1 )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the project details of the projects launched by the organisation,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4385, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details for the projects which were launched by the organization with the most projects?", "output": "SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) DESC LIMIT 1 )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details for the projects which were launched by the organization with the most projects?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4386, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the research staff details, and order in ascending order.", "output": "SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the research staff details, and order in ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4387, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What details are there on the research staff? List the result in ascending alphabetical order.", "output": "SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What details are there on the research staff? List the result in ascending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4388, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many tasks are there in total?", "output": "SELECT count(*) FROM Tasks", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many tasks are there in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4389, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many tasks are there?", "output": "SELECT count(*) FROM Tasks", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many tasks are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4390, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many tasks does each project have? List the task count and the project detail.", "output": "SELECT count(*) , T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many tasks does each project have? List the task count and the project detail.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4391, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each project id, how many tasks are there?", "output": "SELECT count(*) , T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each project id, how many tasks are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4392, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the staff roles of the staff who", "output": "SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the staff roles of the staff who,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4393, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What roles did staff members play between '2003-04-19 15:06:20' and '2016-03-15 00:33:18'?", "output": "SELECT role_code FROM Project_Staff WHERE date_from > '2003-04-19 15:06:20' AND date_to < '2016-03-15 00:33:18'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What roles did staff members play between '2003-04-19 15:06:20' and '2016-03-15 00:33:18'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4394, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the descriptions of all the project outcomes?", "output": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the descriptions of all the project outcomes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4395, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the description of the outcomes for all projects.", "output": "SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the description of the outcomes for all projects.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4396, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which role is most common for the staff?", "output": "SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which role is most common for the staff?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_grants_for_research", "id": 4397, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most common role for the staff?", "output": "SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most common role for the staff?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4398, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many friends does Dan have?", "output": "SELECT count(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: How many friends does Dan have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4399, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many friends does Dan have?", "output": "SELECT count(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Dan'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: How many friends does Dan have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4400, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many females does this network has?", "output": "SELECT count(*) FROM Person WHERE gender = 'female'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: How many females does this network has?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4401, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many females are in the network?", "output": "SELECT count(*) FROM Person WHERE gender = 'female'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: How many females are in the network?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4402, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average age for all person?", "output": "SELECT avg(age) FROM Person", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is the average age for all person?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4403, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average age for all people in the table?", "output": "SELECT avg(age) FROM Person", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is the average age for all people in the table?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4404, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different cities are they from?", "output": "SELECT count(DISTINCT city) FROM Person", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: How many different cities are they from?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4405, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different cities do people originate from?", "output": "SELECT count(DISTINCT city) FROM Person", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: How many different cities do people originate from?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4406, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many type of jobs do they have?", "output": "SELECT count(DISTINCT job) FROM Person", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: How many type of jobs do they have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4407, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different jobs are listed?", "output": "SELECT count(DISTINCT job) FROM Person", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: How many different jobs are listed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4408, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the oldest person?", "output": "SELECT name FROM Person WHERE age = (SELECT max(age) FROM person)", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Who is the oldest person?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4409, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the person who is the oldest?", "output": "SELECT name FROM Person WHERE age = (SELECT max(age) FROM person)", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is the name of the person who is the oldest?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4410, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the oldest person whose job is student?", "output": "SELECT name FROM Person WHERE job = 'student' AND age = (SELECT max(age) FROM person WHERE job = 'student' )", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Who is the oldest person whose job is student?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4411, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the oldest student?", "output": "SELECT name FROM Person WHERE job = 'student' AND age = (SELECT max(age) FROM person WHERE job = 'student' )", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is the name of the oldest student?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4412, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the youngest male?", "output": "SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT min(age) FROM person WHERE gender = 'male' )", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Who is the youngest male?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4413, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the youngest male?", "output": "SELECT name FROM Person WHERE gender = 'male' AND age = (SELECT min(age) FROM person WHERE gender = 'male' )", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is the name of the youngest male?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4414, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How old is the doctor named Zach?", "output": "SELECT age FROM Person WHERE job = 'doctor' AND name = 'Zach'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: How old is the doctor named Zach?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4415, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the age of the doctor named Zach?", "output": "SELECT age FROM Person WHERE job = 'doctor' AND name = 'Zach'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is the age of the doctor named Zach?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4416, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the person whose age is below 30?", "output": "SELECT name FROM Person WHERE age < 30", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Who is the person whose age is below 30?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4417, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the person whose age is below 30?", "output": "SELECT name FROM Person WHERE age < 30", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is the name of the person whose age is below 30?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4418, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many people whose age is greater 30 and job is engineer?", "output": "SELECT count(*) FROM Person WHERE age > 30 AND job = 'engineer'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: How many people whose age is greater 30 and job is engineer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4419, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "HOw many engineers are older than 30?", "output": "SELECT count(*) FROM Person WHERE age > 30 AND job = 'engineer'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: HOw many engineers are older than 30?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4420, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average age for each gender?", "output": "SELECT avg(age) , gender FROM Person GROUP BY gender", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is the average age for each gender?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4421, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How old is each gender, on average?", "output": "SELECT avg(age) , gender FROM Person GROUP BY gender", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: How old is each gender, on average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4422, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is average age for different job title?", "output": "SELECT avg(age) , job FROM Person GROUP BY job", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is average age for different job title?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4423, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How old is the average person for each job?", "output": "SELECT avg(age) , job FROM Person GROUP BY job", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: How old is the average person for each job?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4424, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is average age of male for different job title?", "output": "SELECT avg(age) , job FROM Person WHERE gender = 'male' GROUP BY job", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is average age of male for different job title?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4425, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average age for a male in each job?", "output": "SELECT avg(age) , job FROM Person WHERE gender = 'male' GROUP BY job", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is the average age for a male in each job?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4426, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is minimum age for different job title?", "output": "SELECT min(age) , job FROM Person GROUP BY job", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is minimum age for different job title?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4427, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How old is the youngest person for each job?", "output": "SELECT min(age) , job FROM Person GROUP BY job", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: How old is the youngest person for each job?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4428, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of people who is under 40 for each gender.", "output": "SELECT count(*) , gender FROM Person WHERE age < 40 GROUP BY gender", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find the number of people who is under 40 for each gender.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4429, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many people are under 40 for each gender?", "output": "SELECT count(*) , gender FROM Person WHERE age < 40 GROUP BY gender", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: How many people are under 40 for each gender?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4430, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of people whose age is greater than any engineer sorted by their age.", "output": "SELECT name FROM Person WHERE age > (SELECT min(age) FROM person WHERE job = 'engineer') ORDER BY age", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find the name of people whose age is greater than any engineer sorted by their age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4431, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of all the people who are older than at least one engineer? Order them by age.", "output": "SELECT name FROM Person WHERE age > (SELECT min(age) FROM person WHERE job = 'engineer') ORDER BY age", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is the name of all the people who are older than at least one engineer? Order them by age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4432, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of people whose age is greater than all engineers.", "output": "SELECT count(*) FROM Person WHERE age > (SELECT max(age) FROM person WHERE job = 'engineer')", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find the number of people whose age is greater than all engineers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4433, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many people are older than every engineer?", "output": "SELECT count(*) FROM Person WHERE age > (SELECT max(age) FROM person WHERE job = 'engineer')", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: How many people are older than every engineer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4434, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "list the name, job title of all people ordered by their names.", "output": "SELECT name , job FROM Person ORDER BY name", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: list the name, job title of all people ordered by their names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4435, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and job titles of every person ordered alphabetically by name?", "output": "SELECT name , job FROM Person ORDER BY name", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are the names and job titles of every person ordered alphabetically by name?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4436, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all person sorted in the descending order using age.", "output": "SELECT name FROM Person ORDER BY age DESC", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find the names of all person sorted in the descending order using age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4437, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of everybody sorted by age in descending order?", "output": "SELECT name FROM Person ORDER BY age DESC", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are the names of everybody sorted by age in descending order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4438, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and age of all males in order of their age.", "output": "SELECT name FROM Person WHERE gender = 'male' ORDER BY age", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find the name and age of all males in order of their age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4439, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and age of every male? Order the results by age.", "output": "SELECT name FROM Person WHERE gender = 'male' ORDER BY age", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is the name and age of every male? Order the results by age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4440, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and age of the person who is a friend of both Dan and Alice.", "output": "SELECT T1.name , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' INTERSECT SELECT T1.name , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find the name and age of the person who is a friend of both Dan and Alice.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4441, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and ages of every person who is a friend of both Dan and Alice?", "output": "SELECT T1.name , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' INTERSECT SELECT T1.name , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are the names and ages of every person who is a friend of both Dan and Alice?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4442, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and age of the person who is a friend of Dan or Alice.", "output": "SELECT DISTINCT T1.name , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' OR T2.friend = 'Alice'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find the name and age of the person who is a friend of Dan or Alice.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4443, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different names and ages of every friend of either Dan or alice?", "output": "SELECT DISTINCT T1.name , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' OR T2.friend = 'Alice'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are the different names and ages of every friend of either Dan or alice?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4444, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the person who has friends with age above 40 and under age 30?", "output": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30)", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find the name of the person who has friends with age above 40 and under age 30?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4445, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of every person who has a friend over 40 and under 30?", "output": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30)", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are the names of every person who has a friend over 40 and under 30?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4446, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the person who has friends with age above 40 but not under age 30?", "output": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30)", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find the name of the person who has friends with age above 40 but not under age 30?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4447, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the people who are older 40 but no friends under age 30?", "output": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30)", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are the names of the people who are older 40 but no friends under age 30?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4448, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the person who has no student friends.", "output": "SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.job = 'student'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find the name of the person who has no student friends.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4449, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the people who have no friends who are students?", "output": "SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.job = 'student'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are the names of the people who have no friends who are students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4450, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the person who has exactly one friend.", "output": "SELECT name FROM PersonFriend GROUP BY name HAVING count(*) = 1", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find the person who has exactly one friend.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4451, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of everybody who has exactly one friend?", "output": "SELECT name FROM PersonFriend GROUP BY name HAVING count(*) = 1", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are the names of everybody who has exactly one friend?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4452, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the friends of Bob?", "output": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Who are the friends of Bob?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4453, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are Bob's friends?", "output": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Who are Bob's friends?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4454, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of persons who are friends with Bob.", "output": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find the name of persons who are friends with Bob.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4455, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all of Bob's friends?", "output": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are the names of all of Bob's friends?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4456, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of females who are friends with Zach", "output": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Zach' AND T1.gender = 'female'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find the names of females who are friends with Zach,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4457, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all females who are friends with Zach?", "output": "SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Zach' AND T1.gender = 'female'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are the names of all females who are friends with Zach?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4458, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the female friends of Alice.", "output": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'female'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find the female friends of Alice.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4459, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the friends of Alice who are female?", "output": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'female'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are all the friends of Alice who are female?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4460, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the male friend of Alice whose job is a doctor?", "output": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'male' AND T1.job = 'doctor'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find the male friend of Alice whose job is a doctor?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4461, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the friends of Alice that are doctors?", "output": "SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'male' AND T1.job = 'doctor'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Who are the friends of Alice that are doctors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4462, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who has a friend that is from new york city?", "output": "SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.city = 'new york city'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Who has a friend that is from new york city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4463, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all friends who are from New York?", "output": "SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.city = 'new york city'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are the names of all friends who are from New York?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4464, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who has friends that are younger than the average age?", "output": "SELECT DISTINCT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age < (SELECT avg(age) FROM person)", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Who has friends that are younger than the average age?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4465, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different names of friends who are younger than the average age for a friend?", "output": "SELECT DISTINCT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age < (SELECT avg(age) FROM person)", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are the different names of friends who are younger than the average age for a friend?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4466, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who has friends that are older than the average age? Print their friends and their ages as well", "output": "SELECT DISTINCT T2.name , T2.friend , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT avg(age) FROM person)", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Who has friends that are older than the average age? Print their friends and their ages as well,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4467, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Whare the names, friends, and ages of all people who are older than the average age of a person?", "output": "SELECT DISTINCT T2.name , T2.friend , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT avg(age) FROM person)", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Whare the names, friends, and ages of all people who are older than the average age of a person?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4468, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the friend of Zach with longest year relationship?", "output": "SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT max(YEAR) FROM PersonFriend WHERE name = 'Zach')", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Who is the friend of Zach with longest year relationship?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4469, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which friend of Zach has the longest-lasting friendship?", "output": "SELECT friend FROM PersonFriend WHERE name = 'Zach' AND YEAR = (SELECT max(YEAR) FROM PersonFriend WHERE name = 'Zach')", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Which friend of Zach has the longest-lasting friendship?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4470, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the age of the friend of Zach with longest year relationship?", "output": "SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = (SELECT max(YEAR) FROM PersonFriend WHERE name = 'Zach')", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is the age of the friend of Zach with longest year relationship?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4471, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ages of all of Zach's friends who are in the longest relationship?", "output": "SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = (SELECT max(YEAR) FROM PersonFriend WHERE name = 'Zach')", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are the ages of all of Zach's friends who are in the longest relationship?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4472, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of persons who are friends with Alice for the shortest years.", "output": "SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT min(YEAR) FROM PersonFriend WHERE friend = 'Alice')", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find the name of persons who are friends with Alice for the shortest years.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4473, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all people who are friends with Alice for the shortest amount of time?", "output": "SELECT name FROM PersonFriend WHERE friend = 'Alice' AND YEAR = (SELECT min(YEAR) FROM PersonFriend WHERE friend = 'Alice')", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are the names of all people who are friends with Alice for the shortest amount of time?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4474, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name, age, and job title of persons who are friends with Alice for the longest years.", "output": "SELECT T1.name , T1.age , T1.job FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice' AND T2.year = (SELECT max(YEAR) FROM PersonFriend WHERE friend = 'Alice')", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find the name, age, and job title of persons who are friends with Alice for the longest years.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4475, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names, ages, and jobs of all people who are friends with Alice for the longest amount of time?", "output": "SELECT T1.name , T1.age , T1.job FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice' AND T2.year = (SELECT max(YEAR) FROM PersonFriend WHERE friend = 'Alice')", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are the names, ages, and jobs of all people who are friends with Alice for the longest amount of time?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4476, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the person that has no friend?", "output": "SELECT name FROM person EXCEPT SELECT name FROM PersonFriend", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Who is the person that has no friend?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4477, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all people who do not have friends?", "output": "SELECT name FROM person EXCEPT SELECT name FROM PersonFriend", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are the names of all people who do not have friends?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4478, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which person whose friends have the oldest average age?", "output": "SELECT T2.name , avg(T1.age) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend GROUP BY T2.name ORDER BY avg(T1.age) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Which person whose friends have the oldest average age?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4479, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the person who has the oldest average age for their friends, and what is that average age?", "output": "SELECT T2.name , avg(T1.age) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend GROUP BY T2.name ORDER BY avg(T1.age) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is the name of the person who has the oldest average age for their friends, and what is that average age?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4480, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of people who has no friend living in the city of Austin.", "output": "SELECT count(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city = 'Austin')", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is the total number of people who has no friend living in the city of Austin.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4481, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of people who have no friends living in Austin?", "output": "SELECT count(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city = 'Austin')", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What is the total number of people who have no friends living in Austin?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4482, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find Alice's friends of friends.", "output": "SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name = T2.name JOIN PersonFriend AS T3 ON T1.friend = T3.name JOIN PersonFriend AS T4 ON T3.friend = T4.name WHERE T2.name = 'Alice' AND T4.name != 'Alice'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: Find Alice's friends of friends.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "network_2", "id": 4483, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all of Alice's friends of friends?", "output": "SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name = T2.name JOIN PersonFriend AS T3 ON T1.friend = T3.name JOIN PersonFriend AS T4 ON T3.friend = T4.name WHERE T2.name = 'Alice' AND T4.name != 'Alice'", "input": "Based on \n# the table&column(database schema) information {'Person': ['name', 'age', 'city', 'gender', 'job'], 'PersonFriend': ['name', 'friend', 'year']} and \n# the user question: What are the names of all of Alice's friends of friends?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "decoration_competition", "id": 4484, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many members are there?", "output": "SELECT count(*) FROM member", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many members are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "decoration_competition", "id": 4485, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of members in ascending alphabetical order.", "output": "SELECT Name FROM member ORDER BY Name ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of members in ascending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "decoration_competition", "id": 4486, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and countries of members?", "output": "SELECT Name , Country FROM member", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and countries of members?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "decoration_competition", "id": 4487, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of members whose country is \"United States\" or \"Canada\".", "output": "SELECT Name FROM member WHERE Country = \"United States\" OR Country = \"Canada\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of members whose country is \"United States\" or \"Canada\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "decoration_competition", "id": 4488, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the different countries and the number of members from each.", "output": "SELECT Country , COUNT(*) FROM member GROUP BY Country", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the different countries and the number of members from each.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "decoration_competition", "id": 4489, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the most common country across members.", "output": "SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the most common country across members.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "decoration_competition", "id": 4490, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which countries have more than two members?", "output": "SELECT Country FROM member GROUP BY Country HAVING COUNT(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which countries have more than two members?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "decoration_competition", "id": 4491, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the leader names and locations of colleges.", "output": "SELECT Leader_Name , College_Location FROM college", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the leader names and locations of colleges.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "decoration_competition", "id": 4492, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of members and names of colleges they go to.", "output": "SELECT T2.Name , T1.Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of members and names of colleges they go to.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "decoration_competition", "id": 4493, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names.", "output": "SELECT T2.Name , T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID ORDER BY T2.Name ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "decoration_competition", "id": 4494, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the distinct leader names of colleges associated with members from country \"Canada\".", "output": "SELECT DISTINCT T1.Leader_Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID WHERE T2.Country = \"Canada\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the distinct leader names of colleges associated with members from country \"Canada\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "decoration_competition", "id": 4495, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of members and the decoration themes they have.", "output": "SELECT T1.Name , T2.Decoration_Theme FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of members and the decoration themes they have.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "decoration_competition", "id": 4496, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of members that have a rank in round higher than 3.", "output": "SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID WHERE T2.Rank_in_Round > 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of members that have a rank in round higher than 3.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "decoration_competition", "id": 4497, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of members in ascending order of their rank in rounds.", "output": "SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID ORDER BY Rank_in_Round ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of members in ascending order of their rank in rounds.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "decoration_competition", "id": 4498, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of members who did not participate in any round.", "output": "SELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM round)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of members who did not participate in any round.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4499, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and access counts of all documents, in alphabetic order of the document name.", "output": "SELECT document_name , access_count FROM documents ORDER BY document_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and access counts of all documents, in alphabetic order of the document name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4500, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the documents, as well as the access counts of each, ordered alphabetically?", "output": "SELECT document_name , access_count FROM documents ORDER BY document_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the documents, as well as the access counts of each, ordered alphabetically?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4501, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT document_name , access_count FROM documents ORDER BY access_count DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4502, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT document_name , access_count FROM documents ORDER BY access_count DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4503, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the types of documents with more than 4 documents.", "output": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*) > 4", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the types of documents with more than 4 documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4504, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the codes of types of documents of which there are for or more?", "output": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*) > 4", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the codes of types of documents of which there are for or more?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4505, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total access count of all documents in the most popular document type.", "output": "SELECT sum(access_count) FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total access count of all documents in the most popular document type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4506, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total access count of documents that are of the most common document type?", "output": "SELECT sum(access_count) FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total access count of documents that are of the most common document type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4507, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average access count of documents?", "output": "SELECT avg(access_count) FROM documents", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average access count of documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4508, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average access count across all documents?", "output": "SELECT avg(access_count) FROM documents", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average access count across all documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4509, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the structure of the document with the least number of accesses?", "output": "SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code = t2.document_structure_code GROUP BY t1.document_structure_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the structure of the document with the least number of accesses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4510, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the structure description of the document that has been accessed the fewest number of times.", "output": "SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code = t2.document_structure_code GROUP BY t1.document_structure_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the structure description of the document that has been accessed the fewest number of times.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4511, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the type of the document named \"David CV\"?", "output": "SELECT document_type_code FROM documents WHERE document_name = \"David CV\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the type of the document named \"David CV\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4512, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the type code of the document named \"David CV\".", "output": "SELECT document_type_code FROM documents WHERE document_name = \"David CV\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the type code of the document named \"David CV\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4513, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the list of documents that are both in the most three popular type and have the most three popular structure.", "output": "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", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the list of documents that are both in the most three popular type and have the most three popular structure.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4514, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of documents that have both one of the three most common types and one of three most common structures?", "output": "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", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of documents that have both one of the three most common types and one of three most common structures?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4515, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What document types do have more than 10000 total access number.", "output": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING sum(access_count) > 10000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What document types do have more than 10000 total access number.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4516, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the codes of the document types that do not have a total access count of over 10000.", "output": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING sum(access_count) > 10000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the codes of the document types that do not have a total access count of over 10000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4517, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the section titles of the document named \"David CV\"?", "output": "SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code WHERE t1.document_name = \"David CV\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the section titles of the document named \"David CV\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4518, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the section titles of the document with the name \"David CV\".", "output": "SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code WHERE t1.document_name = \"David CV\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the section titles of the document with the name \"David CV\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4519, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the name of documents without any sections.", "output": "SELECT document_name FROM documents WHERE document_code NOT IN (SELECT document_code FROM document_sections)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the name of documents without any sections.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4520, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of documents that do not have any sections?", "output": "SELECT document_name FROM documents WHERE document_code NOT IN (SELECT document_code FROM document_sections)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of documents that do not have any sections?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4521, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the username and passwords of users with the most popular role.", "output": "SELECT user_name , password FROM users GROUP BY role_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the username and passwords of users with the most popular role.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4522, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the usernames and passwords of users that have the most common role?", "output": "SELECT user_name , password FROM users GROUP BY role_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the usernames and passwords of users that have the most common role?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4523, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average access counts of documents with functional area \"Acknowledgement\".", "output": "SELECT avg(t1.access_count) FROM documents AS t1 JOIN document_functional_areas AS t2 ON t1.document_code = t2.document_code JOIN functional_areas AS t3 ON t2.functional_area_code = t3.functional_area_code WHERE t3.functional_area_description = \"Acknowledgement\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average access counts of documents with functional area \"Acknowledgement\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4524, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average access counts of documents that have the functional area description \"Acknowledgement\"?", "output": "SELECT avg(t1.access_count) FROM documents AS t1 JOIN document_functional_areas AS t2 ON t1.document_code = t2.document_code JOIN functional_areas AS t3 ON t2.functional_area_code = t3.functional_area_code WHERE t3.functional_area_description = \"Acknowledgement\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the average access counts of documents that have the functional area description \"Acknowledgement\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4525, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find names of the document without any images.", "output": "SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find names of the document without any images.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4526, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of documents that do not have any images?", "output": "SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of documents that do not have any images?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4527, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the document with the most number of sections?", "output": "SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code GROUP BY t1.document_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the document with the most number of sections?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4528, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name of the document that has the most sections.", "output": "SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code GROUP BY t1.document_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the name of the document that has the most sections.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4529, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the document names which contains \"CV\".", "output": "SELECT document_name FROM documents WHERE document_name LIKE \"%CV%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the document names which contains \"CV\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4530, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of documents that contain the substring \"CV\"?", "output": "SELECT document_name FROM documents WHERE document_name LIKE \"%CV%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of documents that contain the substring \"CV\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4531, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many users are logged in?", "output": "SELECT count(*) FROM users WHERE user_login = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many users are logged in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4532, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of users that are logged in.", "output": "SELECT count(*) FROM users WHERE user_login = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of users that are logged in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4533, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the description of the most popular role among the users that have logged in.", "output": "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)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the description of the most popular role among the users that have logged in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4534, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description of the most popular role among users that have logged in?", "output": "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)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description of the most popular role among users that have logged in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4535, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average access count of documents with the least popular structure.", "output": "SELECT avg(access_count) FROM documents GROUP BY document_structure_code ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average access count of documents with the least popular structure.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4536, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average access count of documents that have the least common structure?", "output": "SELECT avg(access_count) FROM documents GROUP BY document_structure_code ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average access count of documents that have the least common structure?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4537, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the image name and URLs in the order of their names.", "output": "SELECT image_name , image_url FROM images ORDER BY image_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the image name and URLs in the order of their names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4538, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and urls of images, sorted alphabetically?", "output": "SELECT image_name , image_url FROM images ORDER BY image_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and urls of images, sorted alphabetically?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4539, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of users in each role.", "output": "SELECT count(*) , role_code FROM users GROUP BY role_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of users in each role.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4540, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different role codes for users, and how many users have each?", "output": "SELECT count(*) , role_code FROM users GROUP BY role_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different role codes for users, and how many users have each?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4541, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What document types have more than 2 corresponding documents?", "output": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What document types have more than 2 corresponding documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "document_management", "id": 4542, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the codes of document types that have more than 2 corresponding documents.", "output": "SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the codes of document types that have more than 2 corresponding documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4543, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many companies are there?", "output": "SELECT count(*) FROM Companies", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many companies are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4544, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of companies.", "output": "SELECT count(*) FROM Companies", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of companies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4545, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of companies in descending order of market value.", "output": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of companies in descending order of market value.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4546, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Sort the company names in descending order of the company's market value.", "output": "SELECT name FROM Companies ORDER BY Market_Value_billion DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Sort the company names in descending order of the company's market value.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4547, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of companies whose headquarters are not \"USA\"?", "output": "SELECT name FROM Companies WHERE Headquarters != 'USA'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of companies whose headquarters are not \"USA\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4548, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the companies whose headquarters are not located in \"USA\".", "output": "SELECT name FROM Companies WHERE Headquarters != 'USA'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the companies whose headquarters are not located in \"USA\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4549, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and assets of each company, sorted in ascending order of company name?", "output": "SELECT name , Assets_billion FROM Companies ORDER BY name ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name and assets of each company, sorted in ascending order of company name?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4550, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name and assets of each company in ascending order of company name.", "output": "SELECT name , Assets_billion FROM Companies ORDER BY name ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name and assets of each company in ascending order of company name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4551, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average profits of companies?", "output": "SELECT avg(Profits_billion) FROM Companies", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the average profits of companies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4552, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Compute the average profits companies make.", "output": "SELECT avg(Profits_billion) FROM Companies", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Compute the average profits companies make.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4553, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum and minimum sales of the companies whose industries are not \"Banking\".", "output": "SELECT max(Sales_billion) , min(Sales_billion) FROM Companies WHERE Industry != \"Banking\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum and minimum sales of the companies whose industries are not \"Banking\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4554, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the maximum and minimum sales of the companies that are not in the \"Banking\" industry.", "output": "SELECT max(Sales_billion) , min(Sales_billion) FROM Companies WHERE Industry != \"Banking\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the maximum and minimum sales of the companies that are not in the \"Banking\" industry.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4555, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different industries are the companies in?", "output": "SELECT count(DISTINCT Industry) FROM Companies", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different industries are the companies in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4556, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of distinct company industries.", "output": "SELECT count(DISTINCT Industry) FROM Companies", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of distinct company industries.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4557, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of buildings in descending order of building height.", "output": "SELECT name FROM buildings ORDER BY Height DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of buildings in descending order of building height.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4558, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of buildings sorted in descending order of building height?", "output": "SELECT name FROM buildings ORDER BY Height DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of buildings sorted in descending order of building height?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4559, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the stories of the building with the largest height.", "output": "SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the stories of the building with the largest height.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4560, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the stories of highest building?", "output": "SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the stories of highest building?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4561, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of a building along with the name of a company whose office is in the building.", "output": "SELECT T3.name , T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of a building along with the name of a company whose office is in the building.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4562, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each company, return the company name and the name of the building its office is located in.", "output": "SELECT T3.name , T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each company, return the company name and the name of the building its office is located in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4563, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of the buildings that have more than one company offices.", "output": "SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of the buildings that have more than one company offices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4564, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which buildings have more than one company offices? Give me the building names.", "output": "SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which buildings have more than one company offices? Give me the building names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4565, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of the building that has the most company offices.", "output": "SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name of the building that has the most company offices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4566, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which building has the largest number of company offices? Give me the building name.", "output": "SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which building has the largest number of company offices? Give me the building name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4567, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the names of the buildings whose status is \"on-hold\", in ascending order of stories.", "output": "SELECT name FROM buildings WHERE Status = \"on-hold\" ORDER BY Stories ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the names of the buildings whose status is \"on-hold\", in ascending order of stories.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4568, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the buildings in \"on-hold\" status, and sort them in ascending order of building stories.", "output": "SELECT name FROM buildings WHERE Status = \"on-hold\" ORDER BY Stories ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the buildings in \"on-hold\" status, and sort them in ascending order of building stories.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4569, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show each industry and the corresponding number of companies in that industry.", "output": "SELECT Industry , COUNT(*) FROM Companies GROUP BY Industry", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show each industry and the corresponding number of companies in that industry.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4570, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Whah are the name of each industry and the number of companies in that industry?", "output": "SELECT Industry , COUNT(*) FROM Companies GROUP BY Industry", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Whah are the name of each industry and the number of companies in that industry?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4571, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the industries of companies in descending order of the number of companies.", "output": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the industries of companies in descending order of the number of companies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4572, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Sort all the industries in descending order of the count of companies in each industry", "output": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Sort all the industries in descending order of the count of companies in each industry,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4573, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the industry shared by the most companies.", "output": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the industry shared by the most companies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4574, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which industry has the most companies?", "output": "SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which industry has the most companies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4575, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of buildings that have no company office.", "output": "SELECT name FROM buildings WHERE id NOT IN (SELECT building_id FROM Office_locations)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of buildings that have no company office.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4576, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which buildings do not have any company office? Give me the building names.", "output": "SELECT name FROM buildings WHERE id NOT IN (SELECT building_id FROM Office_locations)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which buildings do not have any company office? Give me the building names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4577, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the industries shared by companies whose headquarters are \"USA\" and companies whose headquarters are \"China\".", "output": "SELECT Industry FROM Companies WHERE Headquarters = \"USA\" INTERSECT SELECT Industry FROM Companies WHERE Headquarters = \"China\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the industries shared by companies whose headquarters are \"USA\" and companies whose headquarters are \"China\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4578, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which industries have both companies with headquarter in \"USA\" and companies with headquarter in \"China\"?", "output": "SELECT Industry FROM Companies WHERE Headquarters = \"USA\" INTERSECT SELECT Industry FROM Companies WHERE Headquarters = \"China\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which industries have both companies with headquarter in \"USA\" and companies with headquarter in \"China\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4579, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of companies whose industry is \"Banking\" or \"Conglomerate\",", "output": "SELECT count(*) FROM Companies WHERE Industry = \"Banking\" OR Industry = \"Conglomerate\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of companies whose industry is \"Banking\" or \"Conglomerate\",,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4580, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many companies are in either \"Banking\" industry or \"Conglomerate\" industry?", "output": "SELECT count(*) FROM Companies WHERE Industry = \"Banking\" OR Industry = \"Conglomerate\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many companies are in either \"Banking\" industry or \"Conglomerate\" industry?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4581, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the headquarters shared by more than two companies.", "output": "SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the headquarters shared by more than two companies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "company_office", "id": 4582, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which headquarter locations are used by more than 2 companies?", "output": "SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which headquarter locations are used by more than 2 companies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "solvency_ii", "id": 4583, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many products are there?", "output": "SELECT count(*) FROM Products", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many products are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "solvency_ii", "id": 4584, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of products in ascending order of price.", "output": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of products in ascending order of price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "solvency_ii", "id": 4585, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and type codes of products?", "output": "SELECT Product_Name , Product_Type_Code FROM Products", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and type codes of products?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "solvency_ii", "id": 4586, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the prices of the products named \"Dining\" or \"Trading Policy\".", "output": "SELECT Product_Price FROM Products WHERE Product_Name = \"Dining\" OR Product_Name = \"Trading Policy\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the prices of the products named \"Dining\" or \"Trading Policy\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "solvency_ii", "id": 4587, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average price for products?", "output": "SELECT avg(Product_Price) FROM Products", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average price for products?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "solvency_ii", "id": 4588, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the product with the highest price?", "output": "SELECT Product_Name FROM Products ORDER BY Product_Price DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the product with the highest price?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "solvency_ii", "id": 4589, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show different type codes of products and the number of products with each type code.", "output": "SELECT Product_Type_Code , COUNT(*) FROM Products GROUP BY Product_Type_Code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show different type codes of products and the number of products with each type code.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "solvency_ii", "id": 4590, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the most common type code across products.", "output": "SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the most common type code across products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "solvency_ii", "id": 4591, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the product type codes that have at least two products.", "output": "SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the product type codes that have at least two products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "solvency_ii", "id": 4592, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the product type codes that have both products with price higher than 4500 and products with price lower than 3000.", "output": "SELECT Product_Type_Code FROM Products WHERE Product_Price > 4500 INTERSECT SELECT Product_Type_Code FROM Products WHERE Product_Price < 3000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the product type codes that have both products with price higher than 4500 and products with price lower than 3000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "solvency_ii", "id": 4593, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of products and the number of events they are in.", "output": "SELECT T1.Product_Name , COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of products and the number of events they are in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "solvency_ii", "id": 4594, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of products and the number of events they are in, sorted by the number of events in descending order.", "output": "SELECT T1.Product_Name , COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name ORDER BY COUNT(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of products and the number of events they are in, sorted by the number of events in descending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "solvency_ii", "id": 4595, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of products that are in at least two events.", "output": "SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of products that are in at least two events.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "solvency_ii", "id": 4596, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of products that are in at least two events in ascending alphabetical order of product name.", "output": "SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*) >= 2 ORDER BY T1.Product_Name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of products that are in at least two events in ascending alphabetical order of product name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "solvency_ii", "id": 4597, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of products that are not in any event.", "output": "SELECT Product_Name FROM Products WHERE Product_ID NOT IN (SELECT Product_ID FROM Products_in_Events)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of products that are not in any event.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4598, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many artworks are there?", "output": "SELECT count(*) FROM artwork", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: How many artworks are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4599, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of artworks in ascending alphabetical order.", "output": "SELECT Name FROM artwork ORDER BY Name ASC", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: List the name of artworks in ascending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4600, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of artworks whose type is not \"Program Talent Show\".", "output": "SELECT Name FROM artwork WHERE TYPE != \"Program Talent Show\"", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: List the name of artworks whose type is not \"Program Talent Show\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4601, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and locations of festivals?", "output": "SELECT Festival_Name , LOCATION FROM festival_detail", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: What are the names and locations of festivals?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4602, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the chairs of festivals, sorted in ascending order of the year held?", "output": "SELECT Chair_Name FROM festival_detail ORDER BY YEAR ASC", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: What are the names of the chairs of festivals, sorted in ascending order of the year held?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4603, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the location of the festival with the largest number of audience?", "output": "SELECT LOCATION FROM festival_detail ORDER BY Num_of_Audience DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: What is the location of the festival with the largest number of audience?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4604, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of festivals held in year 2007?", "output": "SELECT Festival_Name FROM festival_detail WHERE YEAR = 2007", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: What are the names of festivals held in year 2007?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4605, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of audience for festivals?", "output": "SELECT avg(Num_of_Audience) FROM festival_detail", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: What is the average number of audience for festivals?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4606, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of the three most recent festivals.", "output": "SELECT Festival_Name FROM festival_detail ORDER BY YEAR DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: Show the names of the three most recent festivals.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4607, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each nomination, show the name of the artwork and name of the festival where it is nominated.", "output": "SELECT T2.Name , T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: For each nomination, show the name of the artwork and name of the festival where it is nominated.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4608, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show distinct types of artworks that are nominated in festivals in 2007.", "output": "SELECT DISTINCT T2.Type FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID WHERE T3.Year = 2007", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: Show distinct types of artworks that are nominated in festivals in 2007.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4609, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of artworks in ascending order of the year they are nominated in.", "output": "SELECT T2.Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID ORDER BY T3.Year", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: Show the names of artworks in ascending order of the year they are nominated in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4610, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of festivals that have nominated artworks of type \"Program Talent Show\".", "output": "SELECT T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID WHERE T2.Type = \"Program Talent Show\"", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: Show the names of festivals that have nominated artworks of type \"Program Talent Show\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4611, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ids and names of festivals that have at least two nominations for artworks.", "output": "SELECT T1.Festival_ID , T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID GROUP BY T1.Festival_ID HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: Show the ids and names of festivals that have at least two nominations for artworks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4612, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the id, name of each festival and the number of artworks it has nominated.", "output": "SELECT T1.Festival_ID , T3.Festival_Name , COUNT(*) FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID GROUP BY T1.Festival_ID", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: Show the id, name of each festival and the number of artworks it has nominated.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4613, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show different types of artworks with the corresponding number of artworks of each type.", "output": "SELECT TYPE , COUNT(*) FROM artwork GROUP BY TYPE", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: Please show different types of artworks with the corresponding number of artworks of each type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4614, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the most common type of artworks.", "output": "SELECT TYPE FROM artwork GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: List the most common type of artworks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4615, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the year in which there are more than one festivals.", "output": "SELECT YEAR FROM festival_detail GROUP BY YEAR HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: List the year in which there are more than one festivals.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4616, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of artworks that are not nominated.", "output": "SELECT Name FROM Artwork WHERE Artwork_ID NOT IN (SELECT Artwork_ID FROM nomination)", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: List the name of artworks that are not nominated.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4617, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of audience in year 2008 or 2010.", "output": "SELECT Num_of_Audience FROM festival_detail WHERE YEAR = 2008 OR YEAR = 2010", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: Show the number of audience in year 2008 or 2010.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4618, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the total number of the audiences who visited any of the festivals?", "output": "SELECT sum(Num_of_Audience) FROM festival_detail", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: What are the total number of the audiences who visited any of the festivals?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "entertainment_awards", "id": 4619, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In which year are there festivals both inside the 'United States' and outside the 'United States'?", "output": "SELECT YEAR FROM festival_detail WHERE LOCATION = 'United States' INTERSECT SELECT YEAR FROM festival_detail WHERE LOCATION != 'United States'", "input": "Based on \n# the table&column(database schema) information {'festival_detail': ['Festival_ID', 'Festival_Name', 'Chair_Name', 'Location', 'Year', 'Num_of_Audience'], 'artwork': ['Artwork_ID', 'Type', 'Name'], 'nomination': ['Artwork_ID', 'Festival_ID', 'Result']} and \n# the user question: In which year are there festivals both inside the 'United States' and outside the 'United States'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_campaigns_ecommerce", "id": 4620, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many premises are there?", "output": "SELECT count(*) FROM premises", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many premises are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_campaigns_ecommerce", "id": 4621, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the distinct premise types?", "output": "SELECT DISTINCT premises_type FROM premises", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the distinct premise types?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_campaigns_ecommerce", "id": 4622, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the types and details for all premises and order by the premise type.", "output": "SELECT premises_type , premise_details FROM premises ORDER BY premises_type", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the types and details for all premises and order by the premise type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_campaigns_ecommerce", "id": 4623, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show each premise type and the number of premises in that type.", "output": "SELECT premises_type , count(*) FROM premises GROUP BY premises_type", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show each premise type and the number of premises in that type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_campaigns_ecommerce", "id": 4624, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all distinct product categories along with the number of mailshots in each category.", "output": "SELECT product_category , count(*) FROM mailshot_campaigns GROUP BY product_category", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all distinct product categories along with the number of mailshots in each category.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_campaigns_ecommerce", "id": 4625, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name and phone of the customer without any mailshot.", "output": "SELECT customer_name , customer_phone FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM mailshot_customers)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name and phone of the customer without any mailshot.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_campaigns_ecommerce", "id": 4626, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name and phone for customers with a mailshot with outcome code 'No Response'.", "output": "SELECT T1.customer_name , T1.customer_phone FROM customers AS T1 JOIN mailshot_customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.outcome_code = 'No Response'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name and phone for customers with a mailshot with outcome code 'No Response'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_campaigns_ecommerce", "id": 4627, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the outcome code of mailshots along with the number of mailshots in each outcome code.", "output": "SELECT outcome_code , count(*) FROM mailshot_customers GROUP BY outcome_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the outcome code of mailshots along with the number of mailshots in each outcome code.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_campaigns_ecommerce", "id": 4628, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of customers who have at least 2 mailshots with outcome code 'Order'.", "output": "SELECT T2.customer_name FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE outcome_code = 'Order' GROUP BY T1.customer_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of customers who have at least 2 mailshots with outcome code 'Order'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_campaigns_ecommerce", "id": 4629, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of customers who have the most mailshots.", "output": "SELECT T2.customer_name FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of customers who have the most mailshots.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_campaigns_ecommerce", "id": 4630, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and payment method of customers who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome.", "output": "SELECT T2.customer_name , T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'Order' INTERSECT SELECT T2.customer_name , T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.outcome_code = 'No Response'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name and payment method of customers who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_campaigns_ecommerce", "id": 4631, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the premise type and address type code for all customer addresses.", "output": "SELECT T2.premises_type , T1.address_type_code FROM customer_addresses AS T1 JOIN premises AS T2 ON T1.premise_id = T2.premise_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the premise type and address type code for all customer addresses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_campaigns_ecommerce", "id": 4632, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct address type codes for all customer addresses?", "output": "SELECT DISTINCT address_type_code FROM customer_addresses", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct address type codes for all customer addresses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_campaigns_ecommerce", "id": 4633, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the shipping charge and customer id for customer orders with order status Cancelled or Paid.", "output": "SELECT order_shipping_charges , customer_id FROM customer_orders WHERE order_status_code = 'Cancelled' OR order_status_code = 'Paid'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the shipping charge and customer id for customer orders with order status Cancelled or Paid.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_campaigns_ecommerce", "id": 4634, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of customers having an order with shipping method FedEx and order status Paid.", "output": "SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE shipping_method_code = 'FedEx' AND order_status_code = 'Paid'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of customers having an order with shipping method FedEx and order status Paid.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4635, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many courses are there in total?", "output": "SELECT count(*) FROM COURSE", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many courses are there in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4636, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of courses.", "output": "SELECT count(*) FROM COURSE", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of courses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4637, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many courses have more than 2 credits?", "output": "SELECT count(*) FROM COURSE WHERE Credits > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many courses have more than 2 credits?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4638, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of courses with more than 2 credits.", "output": "SELECT count(*) FROM COURSE WHERE Credits > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of courses with more than 2 credits.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4639, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all names of courses with 1 credit?", "output": "SELECT CName FROM COURSE WHERE Credits = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all names of courses with 1 credit?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4640, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of courses with 1 credit?", "output": "SELECT CName FROM COURSE WHERE Credits = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of courses with 1 credit?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4641, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which courses are taught on days MTW?", "output": "SELECT CName FROM COURSE WHERE Days = \"MTW\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which courses are taught on days MTW?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4642, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the course names for courses taught on MTW?", "output": "SELECT CName FROM COURSE WHERE Days = \"MTW\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the course names for courses taught on MTW?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4643, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of departments in Division \"AS\"?", "output": "SELECT count(*) FROM DEPARTMENT WHERE Division = \"AS\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of departments in Division \"AS\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4644, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many departments are in the division AS?", "output": "SELECT count(*) FROM DEPARTMENT WHERE Division = \"AS\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many departments are in the division AS?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4645, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the phones of departments in Room 268?", "output": "SELECT DPhone FROM DEPARTMENT WHERE Room = 268", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the phones of departments in Room 268?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4646, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the phones for departments in room 268.", "output": "SELECT DPhone FROM DEPARTMENT WHERE Room = 268", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the phones for departments in room 268.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4647, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of students that have at least one grade \"B\".", "output": "SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade = \"B\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of students that have at least one grade \"B\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4648, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students have had at least one \"B\" grade?", "output": "SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade = \"B\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students have had at least one \"B\" grade?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4649, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the max and min grade point for all letter grade.", "output": "SELECT max(gradepoint) , min(gradepoint) FROM GRADECONVERSION", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the max and min grade point for all letter grade.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4650, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum and minumum grade points?", "output": "SELECT max(gradepoint) , min(gradepoint) FROM GRADECONVERSION", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum and minumum grade points?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4651, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of students whose first names contain letter \"a\".", "output": "SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names of students whose first names contain letter \"a\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4652, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names for students who have an \"a\" in their first name?", "output": "SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names for students who have an \"a\" in their first name?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4653, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names and last names of male (sex is M) faculties who live in building NEB.", "output": "SELECT Fname , Lname FROM FACULTY WHERE sex = \"M\" AND Building = \"NEB\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names and last names of male (sex is M) faculties who live in building NEB.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4654, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names of faculties with sex M and who live in building NEB?", "output": "SELECT Fname , Lname FROM FACULTY WHERE sex = \"M\" AND Building = \"NEB\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full names of faculties with sex M and who live in building NEB?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4655, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the rooms of faculties with rank professor who live in building NEB.", "output": "SELECT Room FROM FACULTY WHERE Rank = \"Professor\" AND Building = \"NEB\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the rooms of faculties with rank professor who live in building NEB.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4656, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the rooms for members of the faculty who are professors and who live in building NEB?", "output": "SELECT Room FROM FACULTY WHERE Rank = \"Professor\" AND Building = \"NEB\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the rooms for members of the faculty who are professors and who live in building NEB?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4657, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the department name that is in Building \"Mergenthaler\".", "output": "SELECT DName FROM DEPARTMENT WHERE Building = \"Mergenthaler\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the department name that is in Building \"Mergenthaler\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4658, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the department in the Building Mergenthaler?", "output": "SELECT DName FROM DEPARTMENT WHERE Building = \"Mergenthaler\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the department in the Building Mergenthaler?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4659, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all information about courses sorted by credits in the ascending order.", "output": "SELECT * FROM COURSE ORDER BY Credits", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all information about courses sorted by credits in the ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4660, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is all the information about courses, ordered by credits ascending?", "output": "SELECT * FROM COURSE ORDER BY Credits", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is all the information about courses, ordered by credits ascending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4661, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the course name of courses sorted by credits.", "output": "SELECT CName FROM COURSE ORDER BY Credits", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the course name of courses sorted by credits.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4662, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the course names, ordered by credits?", "output": "SELECT CName FROM COURSE ORDER BY Credits", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the course names, ordered by credits?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4663, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name of students in the descending order of age.", "output": "SELECT Fname FROM STUDENT ORDER BY Age DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first name of students in the descending order of age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4664, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of students, ordered by age from greatest to least?", "output": "SELECT Fname FROM STUDENT ORDER BY Age DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of students, ordered by age from greatest to least?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4665, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last name of female (sex is F) students in the descending order of age.", "output": "SELECT LName FROM STUDENT WHERE Sex = \"F\" ORDER BY Age DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the last name of female (sex is F) students in the descending order of age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4666, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the last names of female students, ordered by age descending?", "output": "SELECT LName FROM STUDENT WHERE Sex = \"F\" ORDER BY Age DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the last names of female students, ordered by age descending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4667, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last names of faculties in building Barton in alphabetic order.", "output": "SELECT Lname FROM FACULTY WHERE Building = \"Barton\" ORDER BY Lname", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the last names of faculties in building Barton in alphabetic order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4668, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the last names of faculty in building Barton, sorted by last name?", "output": "SELECT Lname FROM FACULTY WHERE Building = \"Barton\" ORDER BY Lname", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the last names of faculty in building Barton, sorted by last name?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4669, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of faculties of rank Professor in alphabetic order.", "output": "SELECT Fname FROM FACULTY WHERE Rank = \"Professor\" ORDER BY Fname", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names of faculties of rank Professor in alphabetic order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4670, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names for all faculty professors, ordered by first name?", "output": "SELECT Fname FROM FACULTY WHERE Rank = \"Professor\" ORDER BY Fname", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names for all faculty professors, ordered by first name?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4671, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the department that has the biggest number of students minored in?", "output": "SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the department that has the biggest number of students minored in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4672, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the department with the most students minoring in it?", "output": "SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the department with the most students minoring in it?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4673, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the department that has no students minored in?", "output": "SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the department that has no students minored in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4674, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the department htat has no students minoring in it?", "output": "SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the department htat has no students minoring in it?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4675, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the department that has the fewest members.", "output": "SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the department that has the fewest members.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4676, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the department with the fewest members?", "output": "SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the department with the fewest members?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4677, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the rank of the faculty that the fewest faculties belong to.", "output": "SELECT Rank FROM FACULTY GROUP BY Rank ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the rank of the faculty that the fewest faculties belong to.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4678, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the least common faculty rank?", "output": "SELECT Rank FROM FACULTY GROUP BY Rank ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the least common faculty rank?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4679, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of the instructors who teach the top 3 number of courses?", "output": "SELECT T2.Fname , T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last names of the instructors who teach the top 3 number of courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4680, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names of the 3 instructors who teach the most courses?", "output": "SELECT T2.Fname , T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full names of the 3 instructors who teach the most courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4681, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which building does the instructor who teaches the most number of courses live in?", "output": "SELECT T2.Building FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which building does the instructor who teaches the most number of courses live in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4682, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the building that the instructor who teaches the greatest number of courses lives in.", "output": "SELECT T2.Building FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the building that the instructor who teaches the greatest number of courses lives in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4683, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name of courses that have at least five enrollments?", "output": "SELECT T1.CName FROM COURSE AS T1 JOIN ENROLLED_IN AS T2 ON T1.CID = T2.CID GROUP BY T2.CID HAVING COUNT(*) >= 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name of courses that have at least five enrollments?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4684, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the names of the courses with at least five enrollments.", "output": "SELECT T1.CName FROM COURSE AS T1 JOIN ENROLLED_IN AS T2 ON T1.CID = T2.CID GROUP BY T2.CID HAVING COUNT(*) >= 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the names of the courses with at least five enrollments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4685, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name and last name of the instructor of course that has course name", "output": "SELECT T2.Fname , T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID WHERE T1.CName = \"COMPUTER LITERACY\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first name and last name of the instructor of course that has course name,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4686, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the full name of the instructor who has a course named COMPUTER LITERACY?", "output": "SELECT T2.Fname , T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID WHERE T1.CName = \"COMPUTER LITERACY\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the full name of the instructor who has a course named COMPUTER LITERACY?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4687, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the department name and room of the course INTRODUCTION TO COMPUTER SCIENCE.", "output": "SELECT T2.Dname , T2.Room FROM COURSE AS T1 JOIN DEPARTMENT AS T2 ON T1.DNO = T2.DNO WHERE T1.CName = \"INTRODUCTION TO COMPUTER SCIENCE\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the department name and room of the course INTRODUCTION TO COMPUTER SCIENCE.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4688, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the department name and room for the course INTRODUCTION TO COMPUTER SCIENCE?", "output": "SELECT T2.Dname , T2.Room FROM COURSE AS T1 JOIN DEPARTMENT AS T2 ON T1.DNO = T2.DNO WHERE T1.CName = \"INTRODUCTION TO COMPUTER SCIENCE\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the department name and room for the course INTRODUCTION TO COMPUTER SCIENCE?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4689, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the student first and last names and grade points of all enrollments.", "output": "SELECT T3.Fname , T3.LName , T2.gradepoint FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the student first and last names and grade points of all enrollments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4690, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names and gradepoints for all enrollments?", "output": "SELECT T3.Fname , T3.LName , T2.gradepoint FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full names and gradepoints for all enrollments?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4691, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct student first names of all students that have grade point at least 3.8 in one course.", "output": "SELECT DISTINCT T3.Fname FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T2.gradepoint >= 3.8", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the distinct student first names of all students that have grade point at least 3.8 in one course.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4692, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct first names for students with a grade point of 3.8 or above in at least one course?", "output": "SELECT DISTINCT T3.Fname FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T2.gradepoint >= 3.8", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct first names for students with a grade point of 3.8 or above in at least one course?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4693, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the full names of faculties who are members of department with department number 520.", "output": "SELECT T1.Fname , T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the full names of faculties who are members of department with department number 520.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4694, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names of faculty members who are a part of department 520?", "output": "SELECT T1.Fname , T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full names of faculty members who are a part of department 520?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4695, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names and last names of the students that minor in the department with DNO 140.", "output": "SELECT T2.Fname , T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names and last names of the students that minor in the department with DNO 140.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4696, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the full names of students minoring in department 140?", "output": "SELECT T2.Fname , T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID = T2.StuID WHERE T1.DNO = 140", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the full names of students minoring in department 140?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4697, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last names of faculties who are members of computer science department.", "output": "SELECT T2.Lname FROM DEPARTMENT AS T1 JOIN FACULTY AS T2 ON T1.DNO = T3.DNO JOIN MEMBER_OF AS T3 ON T2.FacID = T3.FacID WHERE T1.DName = \"Computer Science\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the last names of faculties who are members of computer science department.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4698, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the last names of faculty who are part of the computer science department?", "output": "SELECT T2.Lname FROM DEPARTMENT AS T1 JOIN FACULTY AS T2 ON T1.DNO = T3.DNO JOIN MEMBER_OF AS T3 ON T2.FacID = T3.FacID WHERE T1.DName = \"Computer Science\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the last names of faculty who are part of the computer science department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4699, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average grade point of student whose last name is Smith.", "output": "SELECT avg(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.LName = \"Smith\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average grade point of student whose last name is Smith.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4700, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average gradepoint for students with the last name Smith?", "output": "SELECT avg(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.LName = \"Smith\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average gradepoint for students with the last name Smith?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4701, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum and minimum grade point of students who live in NYC?", "output": "SELECT max(T2.gradepoint) , min(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = \"NYC\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the maximum and minimum grade point of students who live in NYC?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4702, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the maximum and minimum gradepoints for students living in NYC?", "output": "SELECT max(T2.gradepoint) , min(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade = T2.lettergrade AND T1.StuID = T3.StuID WHERE T3.city_code = \"NYC\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the maximum and minimum gradepoints for students living in NYC?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4703, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of courses that have either 3 credits or 1 credit but 4 hours.", "output": "SELECT CName FROM COURSE WHERE Credits = 3 UNION SELECT CName FROM COURSE WHERE Credits = 1 AND Hours = 4", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of courses that have either 3 credits or 1 credit but 4 hours.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4704, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of courses that give either 3 credits, or 1 credit and 4 hours?", "output": "SELECT CName FROM COURSE WHERE Credits = 3 UNION SELECT CName FROM COURSE WHERE Credits = 1 AND Hours = 4", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of courses that give either 3 credits, or 1 credit and 4 hours?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4705, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of departments that are either in division AS or in division EN and in Building NEB.", "output": "SELECT DName FROM DEPARTMENT WHERE Division = \"AS\" UNION SELECT DName FROM DEPARTMENT WHERE Division = \"EN\" AND Building = \"NEB\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of departments that are either in division AS or in division EN and in Building NEB.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4706, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of departments either in division AS, or in division EN and in building NEB?", "output": "SELECT DName FROM DEPARTMENT WHERE Division = \"AS\" UNION SELECT DName FROM DEPARTMENT WHERE Division = \"EN\" AND Building = \"NEB\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of departments either in division AS, or in division EN and in building NEB?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4707, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name of students not enrolled in any course.", "output": "SELECT Fname FROM STUDENT WHERE StuID NOT IN (SELECT StuID FROM ENROLLED_IN)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first name of students not enrolled in any course.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "college_3", "id": 4708, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all students that are not enrolled in courses?", "output": "SELECT Fname FROM STUDENT WHERE StuID NOT IN (SELECT StuID FROM ENROLLED_IN)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of all students that are not enrolled in courses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4709, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the top three products that were purchased in the largest amount?", "output": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the top three products that were purchased in the largest amount?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4710, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the ids of the three products purchased in the largest amounts.", "output": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the ids of the three products purchased in the largest amounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4711, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the product id and product type of the cheapest product?", "output": "SELECT product_id , product_type_code FROM products ORDER BY product_price LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the product id and product type of the cheapest product?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4712, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the id and product type of the product with the lowest price.", "output": "SELECT product_id , product_type_code FROM products ORDER BY product_price LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the id and product type of the product with the lowest price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4713, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of different product types.", "output": "SELECT count(DISTINCT product_type_code) FROM products", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of different product types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4714, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of distinct product types.", "output": "SELECT count(DISTINCT product_type_code) FROM products", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of distinct product types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4715, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the address of customer 10.", "output": "SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the address of customer 10.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4716, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the address for the customer with id 10?", "output": "SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the address for the customer with id 10?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4717, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the staff ids and genders of all staffs whose job title is Department Manager?", "output": "SELECT T1.staff_id , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Department Manager\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the staff ids and genders of all staffs whose job title is Department Manager?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4718, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the staff ids and genders for any staff with the title Department Manager.", "output": "SELECT T1.staff_id , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Department Manager\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the staff ids and genders for any staff with the title Department Manager.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4719, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each payment method, return how many customers use it.", "output": "SELECT payment_method_code , count(*) FROM customers GROUP BY payment_method_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each payment method, return how many customers use it.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4720, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers use each payment method?", "output": "SELECT payment_method_code , count(*) FROM customers GROUP BY payment_method_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers use each payment method?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4721, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the product that was ordered the most often?", "output": "SELECT product_id FROM order_items GROUP BY product_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the product that was ordered the most often?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4722, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the product id for the product that was ordered most frequently.", "output": "SELECT product_id FROM order_items GROUP BY product_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the product id for the product that was ordered most frequently.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4723, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name, phone number and email address of the customer who made the largest number of orders?", "output": "SELECT T1.customer_name , T1.customer_phone , T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name, phone number and email address of the customer who made the largest number of orders?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4724, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name, phone number and email address for the customer with the most orders.", "output": "SELECT T1.customer_name , T1.customer_phone , T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the name, phone number and email address for the customer with the most orders.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4725, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average price for each type of product?", "output": "SELECT product_type_code , avg(product_price) FROM products GROUP BY product_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average price for each type of product?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4726, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the average price for each product type.", "output": "SELECT product_type_code , avg(product_price) FROM products GROUP BY product_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the average price for each product type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4727, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many department stores does the store chain South have?", "output": "SELECT count(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = \"South\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many department stores does the store chain South have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4728, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of stores the chain South has.", "output": "SELECT count(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = \"South\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of stores the chain South has.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4729, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and job title of the staff who was assigned the latest?", "output": "SELECT T1.staff_name , T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and job title of the staff who was assigned the latest?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4730, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name and job title of the staff with the latest date assigned.", "output": "SELECT T1.staff_name , T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the name and job title of the staff with the latest date assigned.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4731, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the product type, name and price for all the products supplied by supplier id 3.", "output": "SELECT T2.product_type_code , T2.product_name , T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the product type, name and price for all the products supplied by supplier id 3.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4732, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the product type, name, and price for products supplied by supplier 3.", "output": "SELECT T2.product_type_code , T2.product_name , T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the product type, name, and price for products supplied by supplier 3.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4733, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the distinct name of customers whose order status is Pending, in the order of customer id.", "output": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\" ORDER BY T2.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the distinct name of customers whose order status is Pending, in the order of customer id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4734, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct names of customers with an order status of Pending, sorted by customer id?", "output": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\" ORDER BY T2.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct names of customers with an order status of Pending, sorted by customer id?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4735, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and address of the customers who have both New and Pending orders.", "output": "SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"New\" INTERSECT SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and address of the customers who have both New and Pending orders.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4736, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and addressed of customers who have both New and Pending orders?", "output": "SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"New\" INTERSECT SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and addressed of customers who have both New and Pending orders?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4737, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products.", "output": "SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT avg(product_price) FROM products)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4738, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of products from the supplier with id 2, which are more expensive than the average price across all products?", "output": "SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT avg(product_price) FROM products)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of products from the supplier with id 2, which are more expensive than the average price across all products?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4739, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id and name of the department store that has both marketing and managing department?", "output": "SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"marketing\" INTERSECT SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"managing\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id and name of the department store that has both marketing and managing department?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4740, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and names of department stores with both marketing and managing departments?", "output": "SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"marketing\" INTERSECT SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"managing\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids and names of department stores with both marketing and managing departments?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4741, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the two department store chains with the largest number of department stores?", "output": "SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY count(*) DESC LIMIT 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the two department store chains with the largest number of department stores?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4742, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the ids of the two department store chains with the most department stores.", "output": "SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY count(*) DESC LIMIT 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the ids of the two department store chains with the most department stores.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4743, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the department with the least number of staff?", "output": "SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the department with the least number of staff?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4744, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the id of the department with the fewest staff assignments.", "output": "SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the id of the department with the fewest staff assignments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4745, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each product type, return the maximum and minimum price.", "output": "SELECT product_type_code , max(product_price) , min(product_price) FROM products GROUP BY product_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each product type, return the maximum and minimum price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4746, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum and minimum product prices for each product type?", "output": "SELECT product_type_code , max(product_price) , min(product_price) FROM products GROUP BY product_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum and minimum product prices for each product type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4747, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the product type whose average price is higher than the average price of all products.", "output": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING avg(product_price) > (SELECT avg(product_price) FROM products)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the product type whose average price is higher than the average price of all products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4748, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the code of the product type with an average price higher than the average price of all products?", "output": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING avg(product_price) > (SELECT avg(product_price) FROM products)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the code of the product type with an average price higher than the average price of all products?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4749, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id and name of the staff who has been assigned for the shortest period.", "output": "SELECT T1.staff_id , T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id and name of the staff who has been assigned for the shortest period.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4750, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id and name of the staff who has been assigned for the least amount of time?", "output": "SELECT T1.staff_id , T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id and name of the staff who has been assigned for the least amount of time?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4751, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names and ids of all products whose price is between 600 and 700.", "output": "SELECT product_name , product_id FROM products WHERE product_price BETWEEN 600 AND 700", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names and ids of all products whose price is between 600 and 700.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4752, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and ids of products costing between 600 and 700?", "output": "SELECT product_name , product_id FROM products WHERE product_price BETWEEN 600 AND 700", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and ids of products costing between 600 and 700?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4753, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the ids of all distinct customers who made order after some orders that were Cancelled.", "output": "SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT min(order_date) FROM Customer_Orders WHERE order_status_code = \"Cancelled\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the ids of all distinct customers who made order after some orders that were Cancelled.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4754, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct ids of customers who made an order after any order that was Cancelled?", "output": "SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT min(order_date) FROM Customer_Orders WHERE order_status_code = \"Cancelled\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct ids of customers who made an order after any order that was Cancelled?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4755, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff?", "output": "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')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4756, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the id of the staff whose Staff Department Assignment was earlier than that of any Clerical Staff.", "output": "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')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the id of the staff whose Staff Department Assignment was earlier than that of any Clerical Staff.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4757, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and ids of customers whose address contains TN?", "output": "SELECT customer_name , customer_id FROM customers WHERE customer_address LIKE \"%TN%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and ids of customers whose address contains TN?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4758, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names and ids of customers who have TN in their address.", "output": "SELECT customer_name , customer_id FROM customers WHERE customer_address LIKE \"%TN%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names and ids of customers who have TN in their address.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4759, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name and gender of the staff who was assigned in 2016.", "output": "SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE \"2016%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the name and gender of the staff who was assigned in 2016.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4760, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and genders of staff who were assigned in 2016?", "output": "SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE \"2016%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and genders of staff who were assigned in 2016?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4761, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of staff who has been assigned multiple jobs.", "output": "SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id HAVING COUNT (*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of staff who has been assigned multiple jobs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4762, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of staff who have been assigned multiple jobs?", "output": "SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id HAVING COUNT (*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of staff who have been assigned multiple jobs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4763, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name and phone number of all suppliers in the alphabetical order of their addresses.", "output": "SELECT T1.supplier_name , T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name and phone number of all suppliers in the alphabetical order of their addresses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4764, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and phone numbers for all suppliers, sorted in alphabetical order of their addressed?", "output": "SELECT T1.supplier_name , T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and phone numbers for all suppliers, sorted in alphabetical order of their addressed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4765, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the phone numbers of all customers and suppliers.", "output": "SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the phone numbers of all customers and suppliers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4766, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the phone numbers for all customers and suppliers.", "output": "SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the phone numbers for all customers and suppliers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4767, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the ids of all products that were ordered more than three times or supplied more than 80000.", "output": "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", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the ids of all products that were ordered more than three times or supplied more than 80000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4768, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all products that were either ordered more than 3 times or have a cumulative amount purchased of above 80000?", "output": "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", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all products that were either ordered more than 3 times or have a cumulative amount purchased of above 80000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4769, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are id and name of the products whose price is lower than 600 or higher than 900?", "output": "SELECT product_id , product_name FROM products WHERE product_price < 600 OR product_price > 900", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are id and name of the products whose price is lower than 600 or higher than 900?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4770, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the ids and names of products with price lower than 600 or higher than 900.", "output": "SELECT product_id , product_name FROM products WHERE product_price < 600 OR product_price > 900", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the ids and names of products with price lower than 600 or higher than 900.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4771, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000.", "output": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING avg(total_amount_purchased) > 50000 OR avg(total_amount_purchased) < 30000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4772, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of suppliers which have an average amount purchased of above 50000 or below 30000?", "output": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING avg(total_amount_purchased) > 50000 OR avg(total_amount_purchased) < 30000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of suppliers which have an average amount purchased of above 50000 or below 30000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4773, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average amount purchased and value purchased for the supplier who supplies the most products.", "output": "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)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the average amount purchased and value purchased for the supplier who supplies the most products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4774, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products.", "output": "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)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4775, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the largest and smallest customer codes?", "output": "SELECT max(customer_code) , min(customer_code) FROM Customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the largest and smallest customer codes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4776, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the maximum and minimum customer codes.", "output": "SELECT max(customer_code) , min(customer_code) FROM Customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the maximum and minimum customer codes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4777, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all the distinct customers who bought a keyboard.", "output": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = \"keyboard\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of all the distinct customers who bought a keyboard.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4778, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct names of customers who have purchased a keyboard?", "output": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = \"keyboard\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct names of customers who have purchased a keyboard?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4779, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names and phone numbers of all the distinct suppliers who supply red jeans.", "output": "SELECT DISTINCT T1.supplier_name , T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = \"red jeans\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names and phone numbers of all the distinct suppliers who supply red jeans.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4780, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct names and phone numbers for suppliers who have red jeans?", "output": "SELECT DISTINCT T1.supplier_name , T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = \"red jeans\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct names and phone numbers for suppliers who have red jeans?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4781, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the highest and lowest prices of products, grouped by and alphabetically ordered by product type?", "output": "SELECT max(product_price) , min(product_price) , product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the highest and lowest prices of products, grouped by and alphabetically ordered by product type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4782, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the maximum and minimum product prices for each product type, grouped and ordered by product type.", "output": "SELECT max(product_price) , min(product_price) , product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the maximum and minimum product prices for each product type, grouped and ordered by product type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4783, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the order id, customer id for orders in Cancelled status, ordered by their order dates.", "output": "SELECT order_id , customer_id FROM customer_orders WHERE order_status_code = \"Cancelled\" ORDER BY order_date", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the order id, customer id for orders in Cancelled status, ordered by their order dates.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4784, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the order ids and customer ids for orders that have been Cancelled, sorted by their order dates?", "output": "SELECT order_id , customer_id FROM customer_orders WHERE order_status_code = \"Cancelled\" ORDER BY order_date", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the order ids and customer ids for orders that have been Cancelled, sorted by their order dates?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4785, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of products that were bought by at least two distinct customers.", "output": "SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of products that were bought by at least two distinct customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4786, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct names of products purchased by at least two different customers?", "output": "SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct names of products purchased by at least two different customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4787, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of customers who have bought by at least three distinct products.", "output": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id) >= 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of customers who have bought by at least three distinct products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4788, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct names of customers who have purchased at least three different products?", "output": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id) >= 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct names of customers who have purchased at least three different products?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4789, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff.", "output": "SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Sales Person\" EXCEPT SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Clerical Staff\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4790, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and genders of staff who have held the title Sales Person, but never Clerical Staff?", "output": "SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Sales Person\" EXCEPT SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Clerical Staff\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and genders of staff who have held the title Sales Person, but never Clerical Staff?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4791, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id and name of customers whose address contains WY state and do not use credit card for payment.", "output": "SELECT customer_id , customer_name FROM customers WHERE customer_address LIKE \"%WY%\" AND payment_method_code != \"Credit Card\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id and name of customers whose address contains WY state and do not use credit card for payment.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4792, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and names of customers with addressed that contain WY and who do not use a credit card for payment?", "output": "SELECT customer_id , customer_name FROM customers WHERE customer_address LIKE \"%WY%\" AND payment_method_code != \"Credit Card\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids and names of customers with addressed that contain WY and who do not use a credit card for payment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4793, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average price of all product clothes.", "output": "SELECT avg(product_price) FROM products WHERE product_type_code = 'Clothes'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average price of all product clothes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4794, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average price of clothes?", "output": "SELECT avg(product_price) FROM products WHERE product_type_code = 'Clothes'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average price of clothes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4795, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the most expensive hardware product.", "output": "SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the most expensive hardware product.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "department_store", "id": 4796, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the hardware product with the greatest price?", "output": "SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the hardware product with the greatest price?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4797, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many aircrafts are there?", "output": "SELECT count(*) FROM aircraft", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many aircrafts are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4798, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of aircraft?", "output": "SELECT count(*) FROM aircraft", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of aircraft?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4799, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the description of all aircrafts.", "output": "SELECT Description FROM aircraft", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the description of all aircrafts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4800, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the descriptions for the aircrafts?", "output": "SELECT Description FROM aircraft", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the descriptions for the aircrafts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4801, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of international passengers of all airports?", "output": "SELECT avg(International_Passengers) FROM airport", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average number of international passengers of all airports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4802, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of international passengers for an airport?", "output": "SELECT avg(International_Passengers) FROM airport", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average number of international passengers for an airport?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4803, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the number of international and domestic passengers of the airport named London \"Heathrow\"?", "output": "SELECT International_Passengers , Domestic_Passengers FROM airport WHERE Airport_Name = \"London Heathrow\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the number of international and domestic passengers of the airport named London \"Heathrow\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4804, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many international and domestic passengers are there in the airport London Heathrow?", "output": "SELECT International_Passengers , Domestic_Passengers FROM airport WHERE Airport_Name = \"London Heathrow\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many international and domestic passengers are there in the airport London Heathrow?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4805, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the total number of Domestic Passengers of airports that contain the word \"London\".", "output": "SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE \"%London%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the total number of Domestic Passengers of airports that contain the word \"London\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4806, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the total number of domestic passengers at all London airports?", "output": "SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE \"%London%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the total number of domestic passengers at all London airports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4807, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum and minimum number of transit passengers of all aiports.", "output": "SELECT max(Transit_Passengers) , min(Transit_Passengers) FROM airport", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum and minimum number of transit passengers of all aiports.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4808, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum and mininum number of transit passengers for all airports?", "output": "SELECT max(Transit_Passengers) , min(Transit_Passengers) FROM airport", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the maximum and mininum number of transit passengers for all airports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4809, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name of pilots aged 25 or older?", "output": "SELECT Name FROM pilot WHERE Age >= 25", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name of pilots aged 25 or older?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4810, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what is the name of every pilot who is at least 25 years old?", "output": "SELECT Name FROM pilot WHERE Age >= 25", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what is the name of every pilot who is at least 25 years old?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4811, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all pilot names in ascending alphabetical order.", "output": "SELECT Name FROM pilot ORDER BY Name ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all pilot names in ascending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4812, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the pilots in alphabetical order?", "output": "SELECT Name FROM pilot ORDER BY Name ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the pilots in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4813, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List names of all pilot aged 30 or younger in descending alphabetical order.", "output": "SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List names of all pilot aged 30 or younger in descending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4814, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all pilots 30 years old or young in descending alphabetical order?", "output": "SELECT Name FROM pilot WHERE Age <= 30 ORDER BY Name DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all pilots 30 years old or young in descending alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4815, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the names of aircrafts associated with airport with name \"London Gatwick\".", "output": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = \"London Gatwick\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the names of aircrafts associated with airport with name \"London Gatwick\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4816, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the aircrafts associated with London Gatwick airport?", "output": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = \"London Gatwick\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the aircrafts associated with London Gatwick airport?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4817, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000.", "output": "SELECT T1.Aircraft , T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4818, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?", "output": "SELECT T1.Aircraft , T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Total_Passengers > 10000000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4819, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average total number of passengers of airports that are associated with aircraft \"Robinson R-22\"?", "output": "SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = \"Robinson R-22\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average total number of passengers of airports that are associated with aircraft \"Robinson R-22\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4820, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average total number of passengers for all airports that the aircraft \"Robinson R-22\" visits?", "output": "SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T1.Aircraft = \"Robinson R-22\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average total number of passengers for all airports that the aircraft \"Robinson R-22\" visits?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4821, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please list the location and the winning aircraft name.", "output": "SELECT T2.Location , T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please list the location and the winning aircraft name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4822, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the location and name of the winning aircraft?", "output": "SELECT T2.Location , T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the location and name of the winning aircraft?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4823, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of the aircraft that has been named winning aircraft the most number of times.", "output": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of the aircraft that has been named winning aircraft the most number of times.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4824, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the aircraft that has won an award the most?", "output": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the aircraft that has won an award the most?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4825, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of aircrafts and the number of times it won matches.", "output": "SELECT T1.Aircraft , COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of aircrafts and the number of times it won matches.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4826, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each aircraft that has won an award, what is its name and how many time has it won?", "output": "SELECT T1.Aircraft , COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each aircraft that has won an award, what is its name and how many time has it won?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4827, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List names of all pilot in descending order of age.", "output": "SELECT Name FROM pilot ORDER BY Age DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List names of all pilot in descending order of age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4828, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all pilots listed by descending age?", "output": "SELECT Name FROM pilot ORDER BY Age DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all pilots listed by descending age?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4829, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of aircrafts and that won matches at least twice.", "output": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of aircrafts and that won matches at least twice.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4830, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all aircrafts that have won a match at least twice?", "output": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all aircrafts that have won a match at least twice?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4831, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of aircrafts and that did not win any match.", "output": "SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of aircrafts and that did not win any match.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4832, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all aicrafts that have never won any match?", "output": "SELECT Aircraft FROM aircraft WHERE Aircraft_ID NOT IN (SELECT Winning_Aircraft FROM MATCH)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all aicrafts that have never won any match?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4833, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of aircrafts that are associated with both an airport named \"London Heathrow\" and an airport named \"London Gatwick\"", "output": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = \"London Heathrow\" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = \"London Gatwick\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of aircrafts that are associated with both an airport named \"London Heathrow\" and an airport named \"London Gatwick\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4834, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all aircrafts that are associated with both London Heathrow and Gatwick airports?", "output": "SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = \"London Heathrow\" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = \"London Gatwick\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all aircrafts that are associated with both London Heathrow and Gatwick airports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4835, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all information on the airport that has the largest number of international passengers.", "output": "SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all information on the airport that has the largest number of international passengers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4836, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is all the information on the airport with the largest number of international passengers?", "output": "SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is all the information on the airport with the largest number of international passengers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4837, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30.", "output": "SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4838, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and age of the pilot younger than 30 who has won the most number of times?", "output": "SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and age of the pilot younger than 30 who has won the most number of times?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4839, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what is the name and age of the youngest winning pilot?", "output": "SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what is the name and age of the youngest winning pilot?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4840, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How old is the youngest winning pilot and what is their name?", "output": "SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot ORDER BY t1.age LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How old is the youngest winning pilot and what is their name?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4841, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the name of pilots who did not win the matches held in the country of Australia.", "output": "SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: find the name of pilots who did not win the matches held in the country of Australia.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "aircraft", "id": 4842, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the pilots that have not won any matches in Australia?", "output": "SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the pilots that have not won any matches in Australia?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_and_lot", "id": 4843, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many residents does each property have? List property id and resident count.", "output": "SELECT T1.property_id , count(*) FROM properties AS T1 JOIN residents AS T2 ON T1.property_id = T2.property_id GROUP BY T1.property_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many residents does each property have? List property id and resident count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_and_lot", "id": 4844, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'?", "output": "SELECT DISTINCT T1.service_type_code FROM services AS T1 JOIN organizations AS T2 ON T1.organization_id = T2.organization_id WHERE T2.organization_details = 'Denesik and Sons Party'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_and_lot", "id": 4845, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many services has each resident requested? List the resident id, details, and the count in descending order of the count.", "output": "SELECT T1.resident_id , T1.other_details , count(*) FROM Residents AS T1 JOIN Residents_Services AS T2 ON T1.resident_id = T2.resident_id GROUP BY T1.resident_id ORDER BY count(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many services has each resident requested? List the resident id, details, and the count in descending order of the count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_and_lot", "id": 4846, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum number that a certain service is provided? List the service id, details and number.", "output": "SELECT T1.service_id , T1.service_details , count(*) FROM Services AS T1 JOIN Residents_Services AS T2 ON T1.service_id = T2.service_id GROUP BY T1.service_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the maximum number that a certain service is provided? List the service id, details and number.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_and_lot", "id": 4847, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the id and type of each thing, and the details of the organization that owns it.", "output": "SELECT T1.thing_id , T1.type_of_Thing_Code , T2.organization_details FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the id and type of each thing, and the details of the organization that owns it.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_and_lot", "id": 4848, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the id and details of the customers who have at least 3 events?", "output": "SELECT T1.customer_id , T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) >= 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the id and details of the customers who have at least 3 events?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_and_lot", "id": 4849, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is each customer's move in date, and the corresponding customer id and details?", "output": "SELECT T2.date_moved_in , T1.customer_id , T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is each customer's move in date, and the corresponding customer id and details?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_and_lot", "id": 4850, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which events have the number of notes between one and three? List the event id and the property id.", "output": "SELECT T1.Customer_Event_ID , T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID = T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING count(*) BETWEEN 1 AND 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which events have the number of notes between one and three? List the event id and the property id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_and_lot", "id": 4851, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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'", "output": "SELECT DISTINCT T2.thing_id , T2.Type_of_Thing_Code FROM Timed_Status_of_Things AS T1 JOIN Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.Status_of_Thing_Code = 'Close' OR T1.Date_and_Date < '2017-06-19 02:59:21'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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',\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_and_lot", "id": 4852, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct locations have the things with service detail 'Unsatisfied' been located in?", "output": "SELECT count(DISTINCT T2.Location_Code) FROM Things AS T1 JOIN Timed_Locations_of_Things AS T2 ON T1.thing_id = T2.thing_id WHERE T1.service_details = 'Unsatisfied'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct locations have the things with service detail 'Unsatisfied' been located in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_and_lot", "id": 4853, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different status codes of things are there?", "output": "SELECT count(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different status codes of things are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_and_lot", "id": 4854, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which organizations are not a parent organization of others? List the organization id.", "output": "SELECT organization_id FROM organizations EXCEPT SELECT parent_organization_id FROM organizations", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which organizations are not a parent organization of others? List the organization id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_and_lot", "id": 4855, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When is the last day any resident moved in?", "output": "SELECT max(date_moved_in) FROM Residents", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When is the last day any resident moved in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_and_lot", "id": 4856, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the resident details containing the substring 'Miss'?", "output": "SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the resident details containing the substring 'Miss'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_and_lot", "id": 4857, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the customer event id and the corresponding move in date and property id.", "output": "SELECT customer_event_id , date_moved_in , property_id FROM customer_events", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the customer event id and the corresponding move in date and property id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_and_lot", "id": 4858, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers did not have any event?", "output": "SELECT count(*) FROM customers WHERE customer_id NOT IN ( SELECT customer_id FROM customer_events )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers did not have any event?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "local_govt_and_lot", "id": 4859, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct move in dates of the residents?", "output": "SELECT DISTINCT date_moved_in FROM residents", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct move in dates of the residents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4860, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many schools are there?", "output": "SELECT count(*) FROM school", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many schools are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4861, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of schools.", "output": "SELECT count(*) FROM school", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of schools.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4862, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the locations of schools in ascending order of enrollment.", "output": "SELECT LOCATION FROM school ORDER BY Enrollment ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the locations of schools in ascending order of enrollment.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4863, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the list of school locations sorted in ascending order of school enrollment?", "output": "SELECT LOCATION FROM school ORDER BY Enrollment ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the list of school locations sorted in ascending order of school enrollment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4864, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the locations of schools in descending order of founded year.", "output": "SELECT LOCATION FROM school ORDER BY Founded DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the locations of schools in descending order of founded year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4865, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the list of school locations sorted in descending order of school foundation year?", "output": "SELECT LOCATION FROM school ORDER BY Founded DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the list of school locations sorted in descending order of school foundation year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4866, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the enrollments of schools whose denomination is not \"Catholic\"?", "output": "SELECT Enrollment FROM school WHERE Denomination != \"Catholic\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the enrollments of schools whose denomination is not \"Catholic\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4867, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the enrollment for each school that does not have \"Catholic\" as denomination.", "output": "SELECT Enrollment FROM school WHERE Denomination != \"Catholic\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the enrollment for each school that does not have \"Catholic\" as denomination.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4868, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average enrollment of schools?", "output": "SELECT avg(Enrollment) FROM school", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average enrollment of schools?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4869, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Take the average of the school enrollment.", "output": "SELECT avg(Enrollment) FROM school", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Take the average of the school enrollment.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4870, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the teams of the players, sorted in ascending alphabetical order?", "output": "SELECT Team FROM player ORDER BY Team ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the teams of the players, sorted in ascending alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4871, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the team of each player and sort them in ascending alphabetical order.", "output": "SELECT Team FROM player ORDER BY Team ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the team of each player and sort them in ascending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4872, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different positions of players are there?", "output": "SELECT count(DISTINCT POSITION) FROM player", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different positions of players are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4873, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of distinct player positions.", "output": "SELECT count(DISTINCT POSITION) FROM player", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of distinct player positions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4874, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the team of the player of the highest age.", "output": "SELECT Team FROM player ORDER BY Age DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the team of the player of the highest age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4875, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which team has the oldest player?", "output": "SELECT Team FROM player ORDER BY Age DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which team has the oldest player?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4876, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the teams of the players with the top 5 largest ages.", "output": "SELECT Team FROM player ORDER BY Age DESC LIMIT 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the teams of the players with the top 5 largest ages.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4877, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the teams that have the 5 oldest players?", "output": "SELECT Team FROM player ORDER BY Age DESC LIMIT 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the teams that have the 5 oldest players?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4878, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each player, show the team and the location of school they belong to.", "output": "SELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each player, show the team and the location of school they belong to.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4879, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the team and the location of school each player belongs to?", "output": "SELECT T1.Team , T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the team and the location of school each player belongs to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4880, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the locations of schools that have more than 1 player.", "output": "SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the locations of schools that have more than 1 player.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4881, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which schools have more than 1 player? Give me the school locations.", "output": "SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which schools have more than 1 player? Give me the school locations.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4882, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the denomination of the school that has the most players.", "output": "SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the denomination of the school that has the most players.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4883, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the denomination of the school the most players belong to?", "output": "SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the denomination of the school the most players belong to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4884, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show locations and nicknames of schools.", "output": "SELECT T1.Location , T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show locations and nicknames of schools.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4885, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the location and nickname of each school?", "output": "SELECT T1.Location , T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the location and nickname of each school?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4886, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show different denominations and the corresponding number of schools.", "output": "SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show different denominations and the corresponding number of schools.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4887, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each denomination, return the denomination and the count of schools with that denomination.", "output": "SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each denomination, return the denomination and the count of schools with that denomination.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4888, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show different denominations and the corresponding number of schools in descending order.", "output": "SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show different denominations and the corresponding number of schools in descending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4889, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools.", "output": "SELECT Denomination , COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4890, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the school color of the school that has the largest enrollment.", "output": "SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the school color of the school that has the largest enrollment.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4891, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the school color of the school with the largest enrollment?", "output": "SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the school color of the school with the largest enrollment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4892, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the locations of schools that do not have any player.", "output": "SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the locations of schools that do not have any player.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4893, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which schools do not have any player? Give me the school locations.", "output": "SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which schools do not have any player? Give me the school locations.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4894, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the denomination shared by schools founded before 1890 and schools founded after 1900", "output": "SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the denomination shared by schools founded before 1890 and schools founded after 1900,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4895, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the denominations used by both schools founded before 1890 and schools founded after 1900?", "output": "SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the denominations used by both schools founded before 1890 and schools founded after 1900?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4896, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the nicknames of schools that are not in division 1.", "output": "SELECT Nickname FROM school_details WHERE Division != \"Division 1\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the nicknames of schools that are not in division 1.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4897, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the nicknames of schools whose division is not 1?", "output": "SELECT Nickname FROM school_details WHERE Division != \"Division 1\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the nicknames of schools whose division is not 1?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4898, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the denomination shared by more than one school.", "output": "SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the denomination shared by more than one school.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_player", "id": 4899, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the denomination more than one school have?", "output": "SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the denomination more than one school have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4900, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the distinct district names ordered by city area in descending.", "output": "SELECT DISTINCT District_name FROM district ORDER BY city_area DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the distinct district names ordered by city area in descending.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4901, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different district names in order of descending city area?", "output": "SELECT DISTINCT District_name FROM district ORDER BY city_area DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different district names in order of descending city area?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4902, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the list of page size which have more than 3 product listed", "output": "SELECT max_page_size FROM product GROUP BY max_page_size HAVING count(*) > 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the list of page size which have more than 3 product listed,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4903, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum page size for everything that has more than 3 products listed?", "output": "SELECT max_page_size FROM product GROUP BY max_page_size HAVING count(*) > 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the maximum page size for everything that has more than 3 products listed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4904, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and population of district with population between 200000 and 2000000", "output": "SELECT District_name , City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and population of district with population between 200000 and 2000000,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4905, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?", "output": "SELECT District_name , City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4906, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name all districts with city area greater than 10 or population larger than 100000", "output": "SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name all districts with city area greater than 10 or population larger than 100000,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4907, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all districts with a city area greater than 10 or have more than 100000 people living there?", "output": "SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all districts with a city area greater than 10 or have more than 100000 people living there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4908, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which district has the largest population?", "output": "SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which district has the largest population?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4909, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the district with the most residents?", "output": "SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the district with the most residents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4910, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which district has the least area?", "output": "SELECT district_name FROM district ORDER BY city_area ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which district has the least area?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4911, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the district with the smallest area?", "output": "SELECT district_name FROM district ORDER BY city_area ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the district with the smallest area?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4912, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total population of the top 3 districts with the largest area.", "output": "SELECT sum(city_population) FROM district ORDER BY city_area DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total population of the top 3 districts with the largest area.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4913, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of residents for the districts with the 3 largest areas?", "output": "SELECT sum(city_population) FROM district ORDER BY city_area DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of residents for the districts with the 3 largest areas?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4914, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all types of store and number of them.", "output": "SELECT TYPE , count(*) FROM store GROUP BY TYPE", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all types of store and number of them.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4915, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each type of store, how many of them are there?", "output": "SELECT TYPE , count(*) FROM store GROUP BY TYPE", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each type of store, how many of them are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4916, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all stores in Khanewal District.", "output": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = \"Khanewal District\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all stores in Khanewal District.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4917, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the stores located in Khanewal District?", "output": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = \"Khanewal District\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the stores located in Khanewal District?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4918, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the stores in the district with the most population.", "output": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the stores in the district with the most population.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4919, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the stores in the largest district by population?", "output": "SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the stores in the largest district by population?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4920, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which city is the headquarter of the store named \"Blackville\" in?", "output": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = \"Blackville\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which city is the headquarter of the store named \"Blackville\" in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4921, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What city is the headquarter of the store Blackville?", "output": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = \"Blackville\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What city is the headquarter of the store Blackville?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4922, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of stores in each city.", "output": "SELECT t3.headquartered_city , count(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of stores in each city.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4923, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many stores are headquarted in each city?", "output": "SELECT t3.headquartered_city , count(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many stores are headquarted in each city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4924, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the city with the most number of stores.", "output": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the city with the most number of stores.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4925, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the city with the most number of flagship stores?", "output": "SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the city with the most number of flagship stores?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4926, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average pages per minute color?", "output": "SELECT avg(pages_per_minute_color) FROM product", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average pages per minute color?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4927, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of pages per minute color?", "output": "SELECT avg(pages_per_minute_color) FROM product", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average number of pages per minute color?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4928, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What products are available at store named \"Miramichi\"?", "output": "SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = \"Miramichi\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What products are available at store named \"Miramichi\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4929, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What products are sold at the store named Miramichi?", "output": "SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = \"Miramichi\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What products are sold at the store named Miramichi?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4930, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find products with max page size as \"A4\" and pages per minute color smaller than 5.", "output": "SELECT product FROM product WHERE max_page_size = \"A4\" AND pages_per_minute_color < 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find products with max page size as \"A4\" and pages per minute color smaller than 5.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4931, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the products with the maximum page size A4 that also have a pages per minute color smaller than 5?", "output": "SELECT product FROM product WHERE max_page_size = \"A4\" AND pages_per_minute_color < 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the products with the maximum page size A4 that also have a pages per minute color smaller than 5?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4932, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find products with max page size as \"A4\" or pages per minute color smaller than 5.", "output": "SELECT product FROM product WHERE max_page_size = \"A4\" OR pages_per_minute_color < 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find products with max page size as \"A4\" or pages per minute color smaller than 5.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4933, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5?", "output": "SELECT product FROM product WHERE max_page_size = \"A4\" OR pages_per_minute_color < 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4934, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the product whose name contains the word \"Scanner\".", "output": "SELECT product FROM product WHERE product LIKE \"%Scanner%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the product whose name contains the word \"Scanner\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4935, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all of the products whose name includes the substring \"Scanner\"?", "output": "SELECT product FROM product WHERE product LIKE \"%Scanner%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all of the products whose name includes the substring \"Scanner\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4936, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the most prominent max page size among all the products.", "output": "SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the most prominent max page size among all the products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4937, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most common maximum page size?", "output": "SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most common maximum page size?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4938, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the products that are not using the most frequently-used max page size.", "output": "SELECT product FROM product WHERE product != (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the products that are not using the most frequently-used max page size.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4939, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all products that are not the most frequently-used maximum page size?", "output": "SELECT product FROM product WHERE product != (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all products that are not the most frequently-used maximum page size?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4940, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total population of the districts where the area is bigger than the average city area.", "output": "SELECT sum(city_population) FROM district WHERE city_area > (SELECT avg(city_area) FROM district)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total population of the districts where the area is bigger than the average city area.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4941, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total population for all the districts that have an area larger tahn the average city area?", "output": "SELECT sum(city_population) FROM district WHERE city_area > (SELECT avg(city_area) FROM district)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total population for all the districts that have an area larger tahn the average city area?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4942, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of districts where have both city mall and village store type stores.", "output": "SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = \"City Mall\" INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = \"Village Store\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of districts where have both city mall and village store type stores.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "store_product", "id": 4943, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the districts that have both mall and village store style shops?", "output": "SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = \"City Mall\" INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = \"Village Store\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the districts that have both mall and village store style shops?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4944, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total enrollment number of all colleges?", "output": "SELECT sum(enr) FROM College", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the total enrollment number of all colleges?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4945, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are enrolled in college?", "output": "SELECT sum(enr) FROM College", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many students are enrolled in college?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4946, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average enrollment number?", "output": "SELECT avg(enr) FROM College", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the average enrollment number?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4947, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students, on average, does each college have enrolled?", "output": "SELECT avg(enr) FROM College", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many students, on average, does each college have enrolled?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4948, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many colleges in total?", "output": "SELECT count(*) FROM College", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many colleges in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4949, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different colleges are there?", "output": "SELECT count(*) FROM College", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many different colleges are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4950, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many players have more than 1000 hours of training?", "output": "SELECT count(*) FROM Player WHERE HS > 1000", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many players have more than 1000 hours of training?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4951, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different players trained for more than 1000 hours?", "output": "SELECT count(*) FROM Player WHERE HS > 1000", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many different players trained for more than 1000 hours?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4952, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many colleges has more than 15000 students?", "output": "SELECT count(*) FROM College WHERE enr > 15000", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many colleges has more than 15000 students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4953, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of colleges with a student population greater than 15000?", "output": "SELECT count(*) FROM College WHERE enr > 15000", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the number of colleges with a student population greater than 15000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4954, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average training hours of all players?", "output": "SELECT avg(HS) FROM Player", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the average training hours of all players?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4955, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many hours do the players train on average?", "output": "SELECT avg(HS) FROM Player", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many hours do the players train on average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4956, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and training hours of players whose hours are below 1500.", "output": "SELECT pName , HS FROM Player WHERE HS < 1500", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the name and training hours of players whose hours are below 1500.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4957, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and number of hours spent training for each player who trains for less than 1500 hours?", "output": "SELECT pName , HS FROM Player WHERE HS < 1500", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the names and number of hours spent training for each player who trains for less than 1500 hours?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4958, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different colleges do attend the tryout test?", "output": "SELECT count(DISTINCT cName) FROM tryout", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many different colleges do attend the tryout test?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4959, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different colleges were represented at tryouts?", "output": "SELECT count(DISTINCT cName) FROM tryout", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many different colleges were represented at tryouts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4960, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the unique types of player positions in the tryout?", "output": "SELECT count(DISTINCT pPos) FROM tryout", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the unique types of player positions in the tryout?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4961, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different types of player positions?", "output": "SELECT count(DISTINCT pPos) FROM tryout", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the different types of player positions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4962, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students got accepted after the tryout?", "output": "SELECT count(*) FROM tryout WHERE decision = 'yes'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many students got accepted after the tryout?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4963, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students received a yes from tryouts?", "output": "SELECT count(*) FROM tryout WHERE decision = 'yes'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many students received a yes from tryouts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4964, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students whose are playing the role of goalie?", "output": "SELECT count(*) FROM tryout WHERE pPos = 'goalie'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many students whose are playing the role of goalie?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4965, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of students playing as a goalie?", "output": "SELECT count(*) FROM tryout WHERE pPos = 'goalie'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the number of students playing as a goalie?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4966, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the max, average and min training hours of all players.", "output": "SELECT avg(HS) , max(HS) , min(HS) FROM Player", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the max, average and min training hours of all players.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4967, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average, maximum, and minimum for the number of hours spent training?", "output": "SELECT avg(HS) , max(HS) , min(HS) FROM Player", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the average, maximum, and minimum for the number of hours spent training?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4968, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is average enrollment of colleges in the state FL?", "output": "SELECT avg(enr) FROM College WHERE state = 'FL'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is average enrollment of colleges in the state FL?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4969, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is average number of students enrolled in Florida colleges?", "output": "SELECT avg(enr) FROM College WHERE state = 'FL'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is average number of students enrolled in Florida colleges?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4970, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of players whose training hours is between 500 and 1500?", "output": "SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the names of players whose training hours is between 500 and 1500?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4971, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of players who train between 500 and 1500 hours?", "output": "SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the names of players who train between 500 and 1500 hours?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4972, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the players whose names contain letter 'a'.", "output": "SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the players whose names contain letter 'a'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4973, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the players that have names containing the letter a?", "output": "SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Who are the players that have names containing the letter a?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4974, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA.", "output": "SELECT cName , enr FROM College WHERE enr > 10000 AND state = \"LA\"", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4975, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and enrollment numbers for colleges that have more than 10000 enrolled and are located in Louisiana?", "output": "SELECT cName , enr FROM College WHERE enr > 10000 AND state = \"LA\"", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the names and enrollment numbers for colleges that have more than 10000 enrolled and are located in Louisiana?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4976, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all information about college sorted by enrollment number in the ascending order.", "output": "SELECT * FROM College ORDER BY enr", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: List all information about college sorted by enrollment number in the ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4977, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What information do you have on colleges sorted by increasing enrollment numbers?", "output": "SELECT * FROM College ORDER BY enr", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What information do you have on colleges sorted by increasing enrollment numbers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4978, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of the colleges whose enrollment is greater 18000 sorted by the college's name.", "output": "SELECT cName FROM College WHERE enr > 18000 ORDER BY cName", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: List the name of the colleges whose enrollment is greater 18000 sorted by the college's name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4979, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of every college in alphabetical order that has more than 18000 students enrolled?", "output": "SELECT cName FROM College WHERE enr > 18000 ORDER BY cName", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the name of every college in alphabetical order that has more than 18000 students enrolled?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4980, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of players whose card is yes in the descending order of training hours.", "output": "SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the name of players whose card is yes in the descending order of training hours.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4981, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name of the players who received a card in descending order of the hours of training?", "output": "SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the name of the players who received a card in descending order of the hours of training?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4982, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of different colleges involved in the tryout in alphabetical order.", "output": "SELECT DISTINCT cName FROM tryout ORDER BY cName", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the name of different colleges involved in the tryout in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4983, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different names of the colleges involved in the tryout in alphabetical order?", "output": "SELECT DISTINCT cName FROM tryout ORDER BY cName", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the different names of the colleges involved in the tryout in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4984, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which position is most popular among players in the tryout?", "output": "SELECT pPos FROM tryout GROUP BY pPos ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Which position is most popular among players in the tryout?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4985, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What was the most popular position at tryouts?", "output": "SELECT pPos FROM tryout GROUP BY pPos ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What was the most popular position at tryouts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4986, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of students who participate in the tryout for each college ordered by descending count.", "output": "SELECT count(*) , cName FROM tryout GROUP BY cName ORDER BY count(*) DESC", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the number of students who participate in the tryout for each college ordered by descending count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4987, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students participated in tryouts for each college by descennding count?", "output": "SELECT count(*) , cName FROM tryout GROUP BY cName ORDER BY count(*) DESC", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many students participated in tryouts for each college by descennding count?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4988, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is minimum hours of the students playing in different position?", "output": "SELECT min(T2.HS) , T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is minimum hours of the students playing in different position?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4989, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each position, what is the minimum time students spent practicing?", "output": "SELECT min(T2.HS) , T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: For each position, what is the minimum time students spent practicing?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4990, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of schools with the top 3 largest size?", "output": "SELECT cName FROM college ORDER BY enr DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the names of schools with the top 3 largest size?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4991, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the schools with the top 3 largest class sizes?", "output": "SELECT cName FROM college ORDER BY enr DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the names of the schools with the top 3 largest class sizes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4992, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of school that has the smallest enrollment in each state?", "output": "SELECT cName , state , min(enr) FROM college GROUP BY state", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the name of school that has the smallest enrollment in each state?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4993, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the school with smallest enrollment size per state?", "output": "SELECT cName , state , min(enr) FROM college GROUP BY state", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the name of the school with smallest enrollment size per state?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4994, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the states where have some college students in tryout.", "output": "SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the states where have some college students in tryout.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4995, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different states that have students trying out?", "output": "SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the different states that have students trying out?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4996, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the states where have some college students in tryout and their decisions are yes.", "output": "SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the states where have some college students in tryout and their decisions are yes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4997, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different states that had students successfully try out?", "output": "SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the different states that had students successfully try out?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4998, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and college of students whose decisions are yes in the tryout.", "output": "SELECT T1.pName , T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the name and college of students whose decisions are yes in the tryout.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 4999, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the players who received a yes during tryouts, and also what are the names of their colleges?", "output": "SELECT T1.pName , T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the names of all the players who received a yes during tryouts, and also what are the names of their colleges?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5000, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of all students who were in the tryout sorted in alphabetic order.", "output": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the name of all students who were in the tryout sorted in alphabetic order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5001, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all students who tried out in alphabetical order?", "output": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the names of all students who tried out in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5002, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and hours of the students whose tryout decision is yes.", "output": "SELECT T1.pName , T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the name and hours of the students whose tryout decision is yes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5003, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and hours spent practicing of every student who received a yes at tryouts?", "output": "SELECT T1.pName , T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the names and hours spent practicing of every student who received a yes at tryouts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5004, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the states of the colleges that have students in the tryout who played in striker position.", "output": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the states of the colleges that have students in the tryout who played in striker position.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5005, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the states of the colleges where students who tried out for the striker position attend?", "output": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'striker'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the states of the colleges where students who tried out for the striker position attend?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5006, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the students who are in the position of striker and got a yes tryout decision.", "output": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the names of the students who are in the position of striker and got a yes tryout decision.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5007, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all students who successfully tried out for the position of striker?", "output": "SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes' AND T2.pPos = 'striker'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the names of all students who successfully tried out for the position of striker?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5008, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the state of the college which player Charles is attending.", "output": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the state of the college which player Charles is attending.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5009, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In which state is the college that Charles attends?", "output": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: In which state is the college that Charles attends?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5010, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average and maximum hours for the students whose tryout decision is yes.", "output": "SELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the average and maximum hours for the students whose tryout decision is yes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5011, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average and maximum number of hours students who made the team practiced?", "output": "SELECT avg(T1.HS) , max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the average and maximum number of hours students who made the team practiced?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5012, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average hours for the students whose tryout decision is no.", "output": "SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the average hours for the students whose tryout decision is no.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5013, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average number of hours spent practicing for students who got rejected?", "output": "SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the average number of hours spent practicing for students who got rejected?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5014, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum training hours for the students whose training hours is greater than 1000 in different positions?", "output": "SELECT max(T1.HS) , pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the maximum training hours for the students whose training hours is greater than 1000 in different positions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5015, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each position, what is the maximum number of hours for students who spent more than 1000 hours training?", "output": "SELECT max(T1.HS) , pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS > 1000 GROUP BY T2.pPos", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: For each position, what is the maximum number of hours for students who spent more than 1000 hours training?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5016, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which colleges do the tryout players whose name starts with letter D go to?", "output": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Which colleges do the tryout players whose name starts with letter D go to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5017, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which colleges does each player with a name that starts with the letter D who tried out go to?", "output": "SELECT T1.cName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T2.pName LIKE 'D%'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Which colleges does each player with a name that starts with the letter D who tried out go to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5018, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which college has any student who is a goalie and succeeded in the tryout.", "output": "SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Which college has any student who is a goalie and succeeded in the tryout.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5019, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What college has a student who successfully made the team in the role of a goalie?", "output": "SELECT cName FROM tryout WHERE decision = 'yes' AND pPos = 'goalie'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What college has a student who successfully made the team in the role of a goalie?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5020, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the tryout players who are from the college with largest size.", "output": "SELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the name of the tryout players who are from the college with largest size.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5021, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all tryout participants who are from the largest college?", "output": "SELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the names of all tryout participants who are from the largest college?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5022, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision.", "output": "SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5023, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges?", "output": "SELECT DISTINCT T1.state , T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5024, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment.", "output": "SELECT cName FROM College WHERE enr < 13000 AND state = \"AZ\" UNION SELECT cName FROM College WHERE enr > 15000 AND state = \"LA\"", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5025, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT cName FROM College WHERE enr < 13000 AND state = \"AZ\" UNION SELECT cName FROM College WHERE enr > 15000 AND state = \"LA\"", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5026, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of schools that have some students playing in goalie and mid positions.", "output": "SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the names of schools that have some students playing in goalie and mid positions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5027, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all schools that have students trying out for the position of goal and 'mid'-field.", "output": "SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the names of all schools that have students trying out for the position of goal and 'mid'-field.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5028, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of states that have some college students playing in goalie and mid positions.", "output": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the names of states that have some college students playing in goalie and mid positions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5029, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the states that have some college students playing in the positions of goalie and mid-field?", "output": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the names of the states that have some college students playing in the positions of goalie and mid-field?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5030, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many schools have some students playing in goalie and mid positions.", "output": "SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid')", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many schools have some students playing in goalie and mid positions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5031, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many schools have students playing in goalie and mid-field positions?", "output": "SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid')", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many schools have students playing in goalie and mid-field positions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5032, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of schools that have some players in the mid position but not in the goalie position.", "output": "SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the names of schools that have some players in the mid position but not in the goalie position.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5033, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the schools with some players in the mid position but no goalies?", "output": "SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the names of the schools with some players in the mid position but no goalies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5034, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of states that have some college students playing in the mid position but not in the goalie position.", "output": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the names of states that have some college students playing in the mid position but not in the goalie position.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5035, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the states with college students playing in the mid position but no goalies?", "output": "SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie'", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the names of all the states with college students playing in the mid position but no goalies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5036, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many states that have some college students playing in the mid position but not in the goalie position.", "output": "SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many states that have some college students playing in the mid position but not in the goalie position.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5037, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the count of states with college students playing in the mid position but not as goalies?", "output": "SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the count of states with college students playing in the mid position but not as goalies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5038, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the states where have the colleges whose enrollments are less than the largest size.", "output": "SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college)", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find the states where have the colleges whose enrollments are less than the largest size.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5039, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the states with colleges that have enrollments less than the some other college?", "output": "SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college)", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the states with colleges that have enrollments less than the some other college?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5040, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find names of colleges with enrollment greater than that of some (at least one) college in the FL state.", "output": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL')", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find names of colleges with enrollment greater than that of some (at least one) college in the FL state.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5041, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the colleges that are larger than at least one college in Florida?", "output": "SELECT DISTINCT cName FROM college WHERE enr > (SELECT min(enr) FROM college WHERE state = 'FL')", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the names of the colleges that are larger than at least one college in Florida?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5042, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find names of all colleges whose enrollment is greater than that of all colleges in the FL state.", "output": "SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL')", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: Find names of all colleges whose enrollment is greater than that of all colleges in the FL state.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5043, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all colleges with a larger enrollment than the largest college in Florida?", "output": "SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL')", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What are the names of all colleges with a larger enrollment than the largest college in Florida?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5044, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of enrollment of schools that do not have any goalie player?", "output": "SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = \"goalie\")", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the total number of enrollment of schools that do not have any goalie player?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5045, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of students enrolled in schools without any goalies?", "output": "SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = \"goalie\")", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the total number of students enrolled in schools without any goalies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5046, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of states that has some college whose enrollment is larger than the average enrollment?", "output": "SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college)", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the number of states that has some college whose enrollment is larger than the average enrollment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5047, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many states have a college with more students than average?", "output": "SELECT count(DISTINCT state) FROM college WHERE enr > (SELECT avg(enr) FROM college)", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many states have a college with more students than average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5048, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of states that has some colleges whose enrollment is smaller than the average enrollment?", "output": "SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college)", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: What is the number of states that has some colleges whose enrollment is smaller than the average enrollment?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "soccer_2", "id": 5049, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many states have smaller colleges than average?", "output": "SELECT count(DISTINCT state) FROM college WHERE enr < (SELECT avg(enr) FROM college)", "input": "Based on \n# the table&column(database schema) information {'College': ['cName', 'state', 'enr'], 'Player': ['pID', 'pName', 'yCard', 'HS'], 'Tryout': ['pID', 'cName', 'pPos', 'decision']} and \n# the user question: How many states have smaller colleges than average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5050, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many devices are there?", "output": "SELECT count(*) FROM device", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many devices are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5051, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of devices.", "output": "SELECT count(*) FROM device", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of devices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5052, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the carriers of devices in ascending alphabetical order.", "output": "SELECT Carrier FROM device ORDER BY Carrier ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the carriers of devices in ascending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5053, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different carriers for devices, listed in alphabetical order?", "output": "SELECT Carrier FROM device ORDER BY Carrier ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different carriers for devices, listed in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5054, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the carriers of devices whose software platforms are not \"Android\"?", "output": "SELECT Carrier FROM device WHERE Software_Platform != 'Android'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the carriers of devices whose software platforms are not \"Android\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5055, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the device carriers that do not have Android as their software platform.", "output": "SELECT Carrier FROM device WHERE Software_Platform != 'Android'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the device carriers that do not have Android as their software platform.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5056, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of shops in ascending order of open year?", "output": "SELECT Shop_Name FROM shop ORDER BY Open_Year ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of shops in ascending order of open year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5057, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of shops, ordered by year of opening ascending.", "output": "SELECT Shop_Name FROM shop ORDER BY Open_Year ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names of shops, ordered by year of opening ascending.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5058, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average quantity of stocks?", "output": "SELECT avg(Quantity) FROM stock", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average quantity of stocks?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5059, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the average quantity of stocks.", "output": "SELECT avg(Quantity) FROM stock", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the average quantity of stocks.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5060, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and location of the shops in ascending alphabetical order of name.", "output": "SELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and location of the shops in ascending alphabetical order of name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5061, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names and locations of shops, ordered by name in alphabetical order.", "output": "SELECT Shop_Name , LOCATION FROM shop ORDER BY Shop_Name ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names and locations of shops, ordered by name in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5062, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different software platforms are there for devices?", "output": "SELECT count(DISTINCT Software_Platform) FROM device", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different software platforms are there for devices?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5063, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different software platforms.", "output": "SELECT count(DISTINCT Software_Platform) FROM device", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of different software platforms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5064, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the open date of open year of the shop named \"Apple\".", "output": "SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = \"Apple\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the open date of open year of the shop named \"Apple\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5065, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the open dates and years for the shop named Apple?", "output": "SELECT Open_Date , Open_Year FROM shop WHERE Shop_Name = \"Apple\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the open dates and years for the shop named Apple?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5066, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of the shop with the latest open year.", "output": "SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of the shop with the latest open year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5067, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the shop name corresponding to the shop that opened in the most recent year?", "output": "SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the shop name corresponding to the shop that opened in the most recent year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5068, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names of shops and the carriers of devices they have in stock.", "output": "SELECT T3.Shop_Name , T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show names of shops and the carriers of devices they have in stock.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5069, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of device shops, and what are the carriers that they carry devices in stock for?", "output": "SELECT T3.Shop_Name , T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of device shops, and what are the carriers that they carry devices in stock for?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5070, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names of shops that have more than one kind of device in stock.", "output": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show names of shops that have more than one kind of device in stock.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5071, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of shops that have more than a single kind of device in stock?", "output": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of shops that have more than a single kind of device in stock?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5072, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of the shop that has the most kind of devices in stock.", "output": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name of the shop that has the most kind of devices in stock.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5073, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the shop that has the most different kinds of devices in stock?", "output": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the shop that has the most different kinds of devices in stock?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5074, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of the shop that have the largest quantity of devices in stock.", "output": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name of the shop that have the largest quantity of devices in stock.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5075, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the shop that has the greatest quantity of devices in stock?", "output": "SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the shop that has the greatest quantity of devices in stock?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5076, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show different software platforms and the corresponding number of devices using each.", "output": "SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show different software platforms and the corresponding number of devices using each.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5077, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different software platforms for devices, and how many devices have each?", "output": "SELECT Software_Platform , COUNT(*) FROM device GROUP BY Software_Platform", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different software platforms for devices, and how many devices have each?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5078, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the software platforms of devices in descending order of the count.", "output": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the software platforms of devices in descending order of the count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5079, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different software platforms for devices, ordered by frequency descending?", "output": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different software platforms for devices, ordered by frequency descending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5080, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the software platform shared by the greatest number of devices.", "output": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the software platform shared by the greatest number of devices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5081, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the software platform that is most common amongst all devices?", "output": "SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the software platform that is most common amongst all devices?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5082, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of shops that have no devices in stock.", "output": "SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of shops that have no devices in stock.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5083, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of shops that do not have any devices in stock?", "output": "SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of shops that do not have any devices in stock?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5084, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the locations shared by shops with open year later than 2012 and shops with open year before 2008.", "output": "SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the locations shared by shops with open year later than 2012 and shops with open year before 2008.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5085, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which locations contains both shops that opened after the year 2012 and shops that opened before 2008?", "output": "SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which locations contains both shops that opened after the year 2012 and shops that opened before 2008?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5086, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the carriers of devices that have no devices in stock.", "output": "SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the carriers of devices that have no devices in stock.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5087, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the carriers of devices that are not in stock anywhere?", "output": "SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the carriers of devices that are not in stock anywhere?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5088, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the carriers of devices in stock at more than one shop.", "output": "SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the carriers of devices in stock at more than one shop.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "device", "id": 5089, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the carriers of devices that are in stock in more than a single shop?", "output": "SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the carriers of devices that are in stock in more than a single shop?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5090, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many bookings do we have?", "output": "SELECT count(*) FROM BOOKINGS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many bookings do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5091, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the total number of bookings made.", "output": "SELECT count(*) FROM BOOKINGS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the total number of bookings made.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5092, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the order dates of all the bookings.", "output": "SELECT Order_Date FROM BOOKINGS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the order dates of all the bookings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5093, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the order date of each booking?", "output": "SELECT Order_Date FROM BOOKINGS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the order date of each booking?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5094, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all the planned delivery dates and actual delivery dates of bookings.", "output": "SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all the planned delivery dates and actual delivery dates of bookings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5095, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the planned delivery date and actual delivery date for each booking?", "output": "SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the planned delivery date and actual delivery date for each booking?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5096, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers do we have?", "output": "SELECT count(*) FROM CUSTOMERS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5097, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of customers recorded.", "output": "SELECT count(*) FROM CUSTOMERS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of customers recorded.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5098, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the phone and email for customer Harold?", "output": "SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = \"Harold\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the phone and email for customer Harold?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5099, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the phone number and email address of customer \"Harold\".", "output": "SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = \"Harold\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the phone number and email address of customer \"Harold\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5100, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all the Store_Name of drama workshop groups.", "output": "SELECT Store_Name FROM Drama_Workshop_Groups", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all the Store_Name of drama workshop groups.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5101, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the store names of drama workshop groups?", "output": "SELECT Store_Name FROM Drama_Workshop_Groups", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the store names of drama workshop groups?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5102, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the minimum, average, maximum order quantity of all invoices.", "output": "SELECT min(Order_Quantity) , avg(Order_Quantity) , max(Order_Quantity) FROM INVOICES", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the minimum, average, maximum order quantity of all invoices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5103, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the minimum, average, and maximum quantities ordered? Check all the invoices.", "output": "SELECT min(Order_Quantity) , avg(Order_Quantity) , max(Order_Quantity) FROM INVOICES", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the minimum, average, and maximum quantities ordered? Check all the invoices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5104, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct payment method codes in all the invoices?", "output": "SELECT DISTINCT payment_method_code FROM INVOICES", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct payment method codes in all the invoices?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5105, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show me the distinct payment method codes from the invoice record.", "output": "SELECT DISTINCT payment_method_code FROM INVOICES", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show me the distinct payment method codes from the invoice record.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5106, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description of the marketing region China?", "output": "SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = \"China\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description of the marketing region China?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5107, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the marketing region description of China?", "output": "SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = \"China\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the marketing region description of China?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5108, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all the distinct product names with price higher than the average.", "output": "SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT avg(Product_Price) FROM PRODUCTS)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all the distinct product names with price higher than the average.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5109, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct names of the products that cost more than the average?", "output": "SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT avg(Product_Price) FROM PRODUCTS)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct names of the products that cost more than the average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5110, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the most expensive product?", "output": "SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the most expensive product?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5111, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Tell me the name of the most pricy product.", "output": "SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Tell me the name of the most pricy product.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5112, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all product names in ascending order of price.", "output": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all product names in ascending order of price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5113, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Sort the names of products in ascending order of their price.", "output": "SELECT Product_Name FROM Products ORDER BY Product_Price ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Sort the names of products in ascending order of their price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5114, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the phone number of the performer Ashley?", "output": "SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = \"Ashley\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the phone number of the performer Ashley?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5115, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the phone number of performer \"Ashley\".", "output": "SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = \"Ashley\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the phone number of performer \"Ashley\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5116, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all payment method codes and the number of orders for each code.", "output": "SELECT payment_method_code , count(*) FROM INVOICES GROUP BY payment_method_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all payment method codes and the number of orders for each code.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5117, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the distinct payment method codes with the number of orders made", "output": "SELECT payment_method_code , count(*) FROM INVOICES GROUP BY payment_method_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the distinct payment method codes with the number of orders made,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5118, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the payment method code used by the most orders?", "output": "SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the payment method code used by the most orders?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5119, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the payment method that is used the most often in all the invoices. Give me its code.", "output": "SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the payment method that is used the most often in all the invoices. Give me its code.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5120, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which city is the address of the store named \"FJA Filming\" located in?", "output": "SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Store_Name = \"FJA Filming\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which city is the address of the store named \"FJA Filming\" located in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5121, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the city the store named \"FJA Filming\" is in.", "output": "SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Store_Name = \"FJA Filming\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the city the store named \"FJA Filming\" is in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5122, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the states or counties of the address of the stores with marketing region code \"CA\"?", "output": "SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Marketing_Region_Code = \"CA\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the states or counties of the address of the stores with marketing region code \"CA\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5123, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the states or counties where the stores with marketing region code \"CA\" are located.", "output": "SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Marketing_Region_Code = \"CA\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the states or counties where the stores with marketing region code \"CA\" are located.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5124, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the marketing region that the store Rob Dinning belongs to?", "output": "SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code WHERE T2.Store_Name = \"Rob Dinning\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the marketing region that the store Rob Dinning belongs to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5125, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name of the marketing region the store Rob Dinning is located in.", "output": "SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code WHERE T2.Store_Name = \"Rob Dinning\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the name of the marketing region the store Rob Dinning is located in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5126, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the descriptions of the service types with product price above 100?", "output": "SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the descriptions of the service types with product price above 100?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5127, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the descriptions of the service types that cost more than 100.", "output": "SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the descriptions of the service types that cost more than 100.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5128, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description, code and the corresponding count of each service type?", "output": "SELECT T1.Service_Type_Description , T2.Service_Type_Code , COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T2.Service_Type_Code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description, code and the corresponding count of each service type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5129, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the description, code and the number of services for each service type.", "output": "SELECT T1.Service_Type_Description , T2.Service_Type_Code , COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T2.Service_Type_Code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the description, code and the number of services for each service type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5130, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description and code of the type of service that is performed the most often?", "output": "SELECT T1.Service_Type_Description , T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description and code of the type of service that is performed the most often?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5131, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the description and code of the service type that is performed the most times.", "output": "SELECT T1.Service_Type_Description , T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the description and code of the service type that is performed the most times.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5132, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the phones and emails of workshop groups in which services are performed?", "output": "SELECT T1.Store_Phone , T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the phones and emails of workshop groups in which services are performed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5133, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me all the phone numbers and email addresses of the workshop groups where services are performed.", "output": "SELECT T1.Store_Phone , T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me all the phone numbers and email addresses of the workshop groups where services are performed.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5134, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of workshop groups in which services with product name \"film\" are performed?", "output": "SELECT T1.Store_Phone , T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T2.Product_Name = \"film\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of workshop groups in which services with product name \"film\" are performed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5135, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the workshop groups where services with product name \"film\" are performed.", "output": "SELECT T1.Store_Phone , T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T2.Product_Name = \"film\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the workshop groups where services with product name \"film\" are performed.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5136, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different product names? What is the average product price for each of them?", "output": "SELECT Product_Name , avg(Product_Price) FROM PRODUCTS GROUP BY Product_Name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different product names? What is the average product price for each of them?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5137, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each distinct product name, show its average product price.", "output": "SELECT Product_Name , avg(Product_Price) FROM PRODUCTS GROUP BY Product_Name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each distinct product name, show its average product price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5138, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the product names with average product price smaller than 1000000?", "output": "SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING avg(Product_Price) < 1000000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the product names with average product price smaller than 1000000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5139, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the product names whose average product price is below 1000000.", "output": "SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING avg(Product_Price) < 1000000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the product names whose average product price is below 1000000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5140, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the total order quantities of photo products?", "output": "SELECT sum(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_Name = \"photo\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the total order quantities of photo products?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5141, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Compute the total order quantities of the product \"photo\".", "output": "SELECT sum(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_Name = \"photo\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Compute the total order quantities of the product \"photo\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5142, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the order details of the products with price higher than 2000?", "output": "SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the order details of the products with price higher than 2000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5143, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the order detail for the products with price above 2000.", "output": "SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the order detail for the products with price above 2000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5144, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the actual delivery dates of orders with quantity 1?", "output": "SELECT T1.Actual_Delivery_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID WHERE T2.Order_Quantity = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the actual delivery dates of orders with quantity 1?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5145, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the actual delivery date for all the orders with quantity 1", "output": "SELECT T1.Actual_Delivery_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID WHERE T2.Order_Quantity = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the actual delivery date for all the orders with quantity 1,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5146, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the order dates of orders with price higher than 1000?", "output": "SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID JOIN Products AS T3 ON T2.Product_ID = T3.Product_ID WHERE T3.Product_price > 1000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the order dates of orders with price higher than 1000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5147, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the order dates of the orders with price above 1000.", "output": "SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID JOIN Products AS T3 ON T2.Product_ID = T3.Product_ID WHERE T3.Product_price > 1000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the order dates of the orders with price above 1000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5148, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct currency codes are there for all drama workshop groups?", "output": "SELECT count(DISTINCT Currency_Code) FROM Drama_Workshop_Groups", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct currency codes are there for all drama workshop groups?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5149, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of distinct currency codes used in drama workshop groups.", "output": "SELECT count(DISTINCT Currency_Code) FROM Drama_Workshop_Groups", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of distinct currency codes used in drama workshop groups.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5150, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the drama workshop groups with address in Feliciaberg city?", "output": "SELECT T2.Store_Name FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.City_Town = \"Feliciaberg\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the drama workshop groups with address in Feliciaberg city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5151, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the the names of the drama workshop groups that are located in Feliciaberg city.", "output": "SELECT T2.Store_Name FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.City_Town = \"Feliciaberg\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the the names of the drama workshop groups that are located in Feliciaberg city.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5152, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the email addresses of the drama workshop groups with address in Alaska state?", "output": "SELECT T2.Store_Email_Address FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.State_County = \"Alaska\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the email addresses of the drama workshop groups with address in Alaska state?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5153, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the email addresses of the drama workshop groups located in Alaska state.", "output": "SELECT T2.Store_Email_Address FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.State_County = \"Alaska\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the email addresses of the drama workshop groups located in Alaska state.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5154, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all cities along with the number of drama workshop groups in each city.", "output": "SELECT T1.City_Town , count(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all cities along with the number of drama workshop groups in each city.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5155, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many drama workshop groups are there in each city? Return both the city and the count.", "output": "SELECT T1.City_Town , count(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many drama workshop groups are there in each city? Return both the city and the count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5156, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the marketing region code that has the most drama workshop groups?", "output": "SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the marketing region code that has the most drama workshop groups?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5157, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which marketing region has the most drama workshop groups? Give me the region code.", "output": "SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which marketing region has the most drama workshop groups? Give me the region code.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5158, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all cities where at least one customer lives in but no performer lives in.", "output": "SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID = T2.Address_ID EXCEPT SELECT T1.City_Town FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID = T2.Address_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all cities where at least one customer lives in but no performer lives in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5159, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which cities have at least one customer but no performer?", "output": "SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID = T2.Address_ID EXCEPT SELECT T1.City_Town FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID = T2.Address_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which cities have at least one customer but no performer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5160, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most frequent status of bookings?", "output": "SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most frequent status of bookings?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5161, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which status code is the most common of all the bookings?", "output": "SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which status code is the most common of all the bookings?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5162, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the workshop groups that have bookings with status code \"stop\"?", "output": "SELECT T2.Store_Name FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = \"stop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the workshop groups that have bookings with status code \"stop\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5163, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which workshop groups have bookings with status code \"stop\"? Give me the names.", "output": "SELECT T2.Store_Name FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = \"stop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which workshop groups have bookings with status code \"stop\"? Give me the names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5164, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of all the clients with no booking.", "output": "SELECT Customer_Name FROM Clients EXCEPT SELECT T2.Customer_Name FROM Bookings AS T1 JOIN Clients AS T2 ON T1.Customer_ID = T2.Client_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of all the clients with no booking.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5165, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the clients who do not have any booking?", "output": "SELECT Customer_Name FROM Clients EXCEPT SELECT T2.Customer_Name FROM Bookings AS T1 JOIN Clients AS T2 ON T1.Customer_ID = T2.Client_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the clients who do not have any booking?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5166, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average quantities ordered with payment method code \"MasterCard\" on invoices?", "output": "SELECT avg(Order_Quantity) FROM Invoices WHERE payment_method_code = \"MasterCard\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average quantities ordered with payment method code \"MasterCard\" on invoices?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5167, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Check the invoices record and compute the average quantities ordered with the payment method \"MasterCard\".", "output": "SELECT avg(Order_Quantity) FROM Invoices WHERE payment_method_code = \"MasterCard\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Check the invoices record and compute the average quantities ordered with the payment method \"MasterCard\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5168, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the product ID of the most frequently ordered item on invoices?", "output": "SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the product ID of the most frequently ordered item on invoices?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5169, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of the product ordered the most often on invoices.", "output": "SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id of the product ordered the most often on invoices.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5170, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description of the service type which offers both the photo product and the film product?", "output": "SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'film'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description of the service type which offers both the photo product and the film product?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Drama_Workshop_Groups", "id": 5171, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the description of the service type that offers not only the photo product but also the film product.", "output": "SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'film'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the description of the service type that offers not only the photo product but also the film product.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5172, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many bands are there?", "output": "SELECT count(*) FROM Band", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many bands are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5173, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of bands.", "output": "SELECT count(*) FROM Band", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of bands.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5174, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the labels?", "output": "SELECT DISTINCT label FROM Albums", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the labels?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5175, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different album labels listed?", "output": "SELECT DISTINCT label FROM Albums", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different album labels listed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5176, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the albums in 2012.", "output": "SELECT * FROM Albums WHERE YEAR = 2012", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the albums in 2012.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5177, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "return all columns of the albums created in the year of 2012.", "output": "SELECT * FROM Albums WHERE YEAR = 2012", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: return all columns of the albums created in the year of 2012.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5178, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the stage positions of the musicians with first name \"Solveig\"", "output": "SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE Firstname = \"Solveig\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the stage positions of the musicians with first name \"Solveig\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5179, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different stage positions for all musicians whose first name is \"Solveig\"?", "output": "SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE Firstname = \"Solveig\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different stage positions for all musicians whose first name is \"Solveig\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5180, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many songs are there?", "output": "SELECT count(*) FROM Songs", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many songs are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5181, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of songs.", "output": "SELECT count(*) FROM Songs", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of songs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5182, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the songs performed by artist with last name \"Heilo\"", "output": "SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.Lastname = \"Heilo\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the songs performed by artist with last name \"Heilo\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5183, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the songs by the artist whose last name is \"Heilo\"?", "output": "SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.Lastname = \"Heilo\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the songs by the artist whose last name is \"Heilo\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5184, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Hom many musicians performed in the song \"Flash\"?", "output": "SELECT count(*) FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.Title = \"Flash\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Hom many musicians performed in the song \"Flash\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5185, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many musicians play in the song \"Flash\"?", "output": "SELECT count(*) FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.Title = \"Flash\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many musicians play in the song \"Flash\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5186, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the songs produced by artists with first name \"Marianne\".", "output": "SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.firstname = \"Marianne\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the songs produced by artists with first name \"Marianne\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5187, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all songs produced by the artist with the first name \"Marianne\"?", "output": "SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.firstname = \"Marianne\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all songs produced by the artist with the first name \"Marianne\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5188, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who performed the song named \"Badlands\"? Show the first name and the last name.", "output": "SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Badlands\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who performed the song named \"Badlands\"? Show the first name and the last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5189, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of the artist who perfomed the song \"Badlands\"?", "output": "SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Badlands\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last names of the artist who perfomed the song \"Badlands\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5190, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is performing in the back stage position for the song \"Badlands\"? Show the first name and the last name.", "output": "SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Badlands\" AND T1.StagePosition = \"back\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who is performing in the back stage position for the song \"Badlands\"? Show the first name and the last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5191, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of the performer who was in the back stage position for the song \"Badlands\"?", "output": "SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Badlands\" AND T1.StagePosition = \"back\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last names of the performer who was in the back stage position for the song \"Badlands\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5192, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many unique labels are there for albums?", "output": "SELECT count(DISTINCT label) FROM albums", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many unique labels are there for albums?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5193, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the unique labels for the albums?", "output": "SELECT count(DISTINCT label) FROM albums", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the unique labels for the albums?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5194, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the label that has the most albums?", "output": "SELECT label FROM albums GROUP BY label ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the label that has the most albums?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5195, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the label with the most albums?", "output": "SELECT label FROM albums GROUP BY label ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the label with the most albums?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5196, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last name of the musician that have produced the most number of songs?", "output": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the last name of the musician that have produced the most number of songs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5197, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last name of the musician who was in the most songs?", "output": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the last name of the musician who was in the most songs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5198, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last name of the musician that has been at the back position the most?", "output": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE stageposition = \"back\" GROUP BY lastname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the last name of the musician that has been at the back position the most?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5199, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last name of the musicians who has played back position the most?", "output": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE stageposition = \"back\" GROUP BY lastname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the last name of the musicians who has played back position the most?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5200, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the songs whose name contains the word \"the\".", "output": "SELECT title FROM songs WHERE title LIKE '% the %'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the songs whose name contains the word \"the\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5201, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the songs whose title has the word \"the\"?", "output": "SELECT title FROM songs WHERE title LIKE '% the %'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the songs whose title has the word \"the\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5202, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the instruments used?", "output": "SELECT DISTINCT instrument FROM Instruments", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the instruments used?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5203, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different instruments listed in the database?", "output": "SELECT DISTINCT instrument FROM Instruments", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different instruments listed in the database?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5204, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What instrument did the musician with last name \"Heilo\" use in the song \"Le Pop\"?", "output": "SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = \"Heilo\" AND T3.title = \"Le Pop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What instrument did the musician with last name \"Heilo\" use in the song \"Le Pop\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5205, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What instruments did the musician with the last name \"Heilo\" play in the song \"Le Pop\"?", "output": "SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = \"Heilo\" AND T3.title = \"Le Pop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What instruments did the musician with the last name \"Heilo\" play in the song \"Le Pop\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5206, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most used instrument?", "output": "SELECT instrument FROM instruments GROUP BY instrument ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most used instrument?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5207, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What instrument is used the most?", "output": "SELECT instrument FROM instruments GROUP BY instrument ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What instrument is used the most?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5208, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many songs have used the instrument \"drums\"?", "output": "SELECT count(*) FROM instruments WHERE instrument = \"drums\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many songs have used the instrument \"drums\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5209, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many songs use drums as an instrument?", "output": "SELECT count(*) FROM instruments WHERE instrument = \"drums\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many songs use drums as an instrument?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5210, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What instruments does the the song \"Le Pop\" use?", "output": "SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What instruments does the the song \"Le Pop\" use?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5211, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the instruments are used in the song \"Le Pop\"?", "output": "SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the instruments are used in the song \"Le Pop\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5212, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many instruments does the song \"Le Pop\" use?", "output": "SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many instruments does the song \"Le Pop\" use?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5213, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different instruments are used in the song \"Le Pop\"?", "output": "SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different instruments are used in the song \"Le Pop\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5214, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many instrument does the musician with last name \"Heilo\" use?", "output": "SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = \"Heilo\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many instrument does the musician with last name \"Heilo\" use?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5215, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different instruments does the musician with the last name \"Heilo\" use?", "output": "SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = \"Heilo\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different instruments does the musician with the last name \"Heilo\" use?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5216, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the instruments ever used by the musician with last name \"Heilo\"?", "output": "SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = \"Heilo\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the instruments ever used by the musician with last name \"Heilo\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5217, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the instruments used by the musician with the last name \"Heilo\"?", "output": "SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = \"Heilo\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the instruments used by the musician with the last name \"Heilo\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5218, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which song has the most vocals?", "output": "SELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid GROUP BY T1.songid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which song has the most vocals?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5219, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the song with the most vocals?", "output": "SELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid GROUP BY T1.songid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the song with the most vocals?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5220, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which vocal type is the most frequently appearring type?", "output": "SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which vocal type is the most frequently appearring type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5221, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the type of vocables that appears most frequently?", "output": "SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the type of vocables that appears most frequently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5222, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which vocal type has the band mate with last name \"Heilo\" played the most?", "output": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = \"Heilo\" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which vocal type has the band mate with last name \"Heilo\" played the most?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5223, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the type of vocals that the band member with the last name \"Heilo\" played the most?", "output": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = \"Heilo\" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the type of vocals that the band member with the last name \"Heilo\" played the most?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5224, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the vocal types used in song \"Le Pop\"?", "output": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the vocal types used in song \"Le Pop\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5225, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the types of vocals used in the song \"Le Pop\"?", "output": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the types of vocals used in the song \"Le Pop\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5226, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of vocal types used in song \"Demon Kitty Rag\"?", "output": "SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Demon Kitty Rag\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of vocal types used in song \"Demon Kitty Rag\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5227, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the types of vocals used in the song \"Demon Kitty Rag\"?", "output": "SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Demon Kitty Rag\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the types of vocals used in the song \"Demon Kitty Rag\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5228, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many songs have a lead vocal?", "output": "SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = \"lead\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many songs have a lead vocal?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5229, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many songs have vocals of type lead?", "output": "SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = \"lead\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many songs have vocals of type lead?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5230, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which vocal type did the musician with first name \"Solveig\" played in the song with title \"A Bar in Amsterdam\"?", "output": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.firstname = \"Solveig\" AND T2.title = \"A Bar In Amsterdam\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which vocal type did the musician with first name \"Solveig\" played in the song with title \"A Bar in Amsterdam\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5231, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the types of vocals that the musician with the first name \"Solveig\" played in the song \"A Bar in Amsterdam\"?", "output": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.firstname = \"Solveig\" AND T2.title = \"A Bar In Amsterdam\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the types of vocals that the musician with the first name \"Solveig\" played in the song \"A Bar in Amsterdam\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5232, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the songs that do not have a lead vocal.", "output": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = \"lead\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the songs that do not have a lead vocal.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5233, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the songs without a lead vocal?", "output": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = \"lead\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the songs without a lead vocal?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5234, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the vocal types.", "output": "SELECT DISTINCT TYPE FROM vocals", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the vocal types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5235, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different types of vocals?", "output": "SELECT DISTINCT TYPE FROM vocals", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different types of vocals?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5236, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the albums produced in year 2010?", "output": "SELECT * FROM Albums WHERE YEAR = 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the albums produced in year 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5237, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What information is there on albums from 2010?", "output": "SELECT * FROM Albums WHERE YEAR = 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What information is there on albums from 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5238, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who performed the song named \"Le Pop\"?", "output": "SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Le Pop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who performed the song named \"Le Pop\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5239, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first and last name of artist who performed \"Le Pop\"?", "output": "SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Le Pop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first and last name of artist who performed \"Le Pop\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5240, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last name of the musician that have produced the most songs?", "output": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the last name of the musician that have produced the most songs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5241, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last name of the artist who sang the most songs?", "output": "SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the last name of the artist who sang the most songs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5242, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What instrument did the musician with last name \"Heilo\" use in the song \"Badlands\"?", "output": "SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = \"Heilo\" AND T3.title = \"Badlands\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What instrument did the musician with last name \"Heilo\" use in the song \"Badlands\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5243, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What instruments did the musician with the last name \"Heilo\" play in \"Badlands\"?", "output": "SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = \"Heilo\" AND T3.title = \"Badlands\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What instruments did the musician with the last name \"Heilo\" play in \"Badlands\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5244, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many instruments does the song \"Badlands\" use?", "output": "SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Badlands\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many instruments does the song \"Badlands\" use?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5245, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different instruments are used in the song \"Badlands\"?", "output": "SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Badlands\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different instruments are used in the song \"Badlands\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5246, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the vocal types used in song \"Badlands\"?", "output": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Badlands\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the vocal types used in song \"Badlands\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5247, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What types of vocals are used in the song \"Badlands\"?", "output": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Badlands\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What types of vocals are used in the song \"Badlands\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5248, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of vocal types used in song \"Le Pop\"", "output": "SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of vocal types used in song \"Le Pop\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5249, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many vocal types are used in the song \"Le Pop\"?", "output": "SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = \"Le Pop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many vocal types are used in the song \"Le Pop\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5250, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many songs have a shared vocal?", "output": "SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = \"shared\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many songs have a shared vocal?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5251, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different songs have shared vocals?", "output": "SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = \"shared\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different songs have shared vocals?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5252, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the songs that do not have a back vocal.", "output": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = \"back\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the songs that do not have a back vocal.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5253, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different names of all songs without back vocals?", "output": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = \"back\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different names of all songs without back vocals?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5254, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which vocal type has the band mate with first name \"Solveig\" played the most?", "output": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = \"Solveig\" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which vocal type has the band mate with first name \"Solveig\" played the most?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5255, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the types of vocals that the band member with the first name \"Solveig\" played the most?", "output": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = \"Solveig\" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the types of vocals that the band member with the first name \"Solveig\" played the most?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5256, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which vocal type did the musician with last name \"Heilo\" played in the song with title \"Der Kapitan\"?", "output": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.lastname = \"Heilo\" AND T2.title = \"Der Kapitan\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which vocal type did the musician with last name \"Heilo\" played in the song with title \"Der Kapitan\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5257, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the types of vocals that the musician with the last name \"Heilo\" played in \"Der Kapitan\"?", "output": "SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.lastname = \"Heilo\" AND T2.title = \"Der Kapitan\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the types of vocals that the musician with the last name \"Heilo\" played in \"Der Kapitan\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5258, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name of the band mate that has performed in most songs.", "output": "SELECT t2.firstname FROM Performance AS t1 JOIN Band AS t2 ON t1.bandmate = t2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY firstname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first name of the band mate that has performed in most songs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5259, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name of the band mate who perfomed in the most songs?", "output": "SELECT t2.firstname FROM Performance AS t1 JOIN Band AS t2 ON t1.bandmate = t2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY firstname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name of the band mate who perfomed in the most songs?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5260, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which vocal type has the band mate with first name \"Marianne\" played the most?", "output": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = \"Marianne\" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which vocal type has the band mate with first name \"Marianne\" played the most?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5261, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the vocal type of the band mate whose first name is \"Marianne\" played the most?", "output": "SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = \"Marianne\" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the vocal type of the band mate whose first name is \"Marianne\" played the most?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5262, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is performing in the back stage position for the song \"Der Kapitan\"? Show the first name and last name.", "output": "SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Der Kapitan\" AND T1.StagePosition = \"back\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who is performing in the back stage position for the song \"Der Kapitan\"? Show the first name and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5263, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first and last name of the artist who performed back stage for the song \"Der Kapitan\"?", "output": "SELECT T2.firstname , T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = \"Der Kapitan\" AND T1.StagePosition = \"back\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first and last name of the artist who performed back stage for the song \"Der Kapitan\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5264, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of songs that does not have a back vocal.", "output": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = \"back\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of songs that does not have a back vocal.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5265, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the songs that do not have back vocals?", "output": "SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = \"back\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the songs that do not have back vocals?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5266, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the songs in album \"A Kiss Before You Go: Live in Hamburg\"?", "output": "SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE T1.title = \"A Kiss Before You Go: Live in Hamburg\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the songs in album \"A Kiss Before You Go: Live in Hamburg\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5267, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the song titles on the album \"A Kiss Before You Go: Live in Hamburg\"?", "output": "SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE T1.title = \"A Kiss Before You Go: Live in Hamburg\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the song titles on the album \"A Kiss Before You Go: Live in Hamburg\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5268, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the songs in albums under label \"Universal Music Group\"?", "output": "SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.label = \"Universal Music Group\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the songs in albums under label \"Universal Music Group\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5269, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the songs whose album is under the label of \"Universal Music Group\"?", "output": "SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.label = \"Universal Music Group\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the songs whose album is under the label of \"Universal Music Group\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5270, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of songs in all the studio albums.", "output": "SELECT count(DISTINCT T3.title) FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.type = \"Studio\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of songs in all the studio albums.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_2", "id": 5271, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many songs appear in studio albums?", "output": "SELECT count(DISTINCT T3.title) FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.type = \"Studio\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many songs appear in studio albums?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5272, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the founder of Sony?", "output": "SELECT founder FROM manufacturers WHERE name = 'Sony'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Who is the founder of Sony?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5273, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the founder of Sony.", "output": "SELECT founder FROM manufacturers WHERE name = 'Sony'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Return the founder of Sony.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5274, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Where is the headquarter of the company founded by James?", "output": "SELECT headquarter FROM manufacturers WHERE founder = 'James'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Where is the headquarter of the company founded by James?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5275, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the headquarter of the company whose founder is James?", "output": "SELECT headquarter FROM manufacturers WHERE founder = 'James'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What is the headquarter of the company whose founder is James?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5276, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first.", "output": "SELECT name , headquarter FROM manufacturers ORDER BY revenue DESC", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5277, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and headquarters of all manufacturers, ordered by revenue descending?", "output": "SELECT name , headquarter FROM manufacturers ORDER BY revenue DESC", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the names and headquarters of all manufacturers, ordered by revenue descending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5278, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average, maximum and total revenues of all companies?", "output": "SELECT avg(revenue) , max(revenue) , sum(revenue) FROM manufacturers", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the average, maximum and total revenues of all companies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5279, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the average, maximum, and total revenues across all manufacturers.", "output": "SELECT avg(revenue) , max(revenue) , sum(revenue) FROM manufacturers", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Return the average, maximum, and total revenues across all manufacturers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5280, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many companies were created by Andy?", "output": "SELECT count(*) FROM manufacturers WHERE founder = 'Andy'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: How many companies were created by Andy?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5281, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the number of companies created by Andy.", "output": "SELECT count(*) FROM manufacturers WHERE founder = 'Andy'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Return the number of companies created by Andy.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5282, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total revenue created by the companies whose headquarter is located at Austin.", "output": "SELECT sum(revenue) FROM manufacturers WHERE headquarter = 'Austin'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find the total revenue created by the companies whose headquarter is located at Austin.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5283, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the sum of revenue from companies with headquarters in Austin?", "output": "SELECT sum(revenue) FROM manufacturers WHERE headquarter = 'Austin'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What is the sum of revenue from companies with headquarters in Austin?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5284, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different cities listed?", "output": "SELECT DISTINCT headquarter FROM manufacturers", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the different cities listed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5285, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the distinct headquarters of manufacturers.", "output": "SELECT DISTINCT headquarter FROM manufacturers", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Give the distinct headquarters of manufacturers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5286, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of manufactures that are based in Tokyo or Beijing.", "output": "SELECT count(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find the number of manufactures that are based in Tokyo or Beijing.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5287, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many manufacturers have headquarters in either Tokyo or Beijing?", "output": "SELECT count(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: How many manufacturers have headquarters in either Tokyo or Beijing?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5288, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the founder of the company whose name begins with the letter 'S'.", "output": "SELECT founder FROM manufacturers WHERE name LIKE 'S%'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find the founder of the company whose name begins with the letter 'S'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5289, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the founders of companies whose first letter is S?", "output": "SELECT founder FROM manufacturers WHERE name LIKE 'S%'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Who is the founders of companies whose first letter is S?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5290, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of companies whose revenue is between 100 and 150.", "output": "SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find the name of companies whose revenue is between 100 and 150.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5291, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of companies with revenue between 100 and 150?", "output": "SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the names of companies with revenue between 100 and 150?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5292, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total revenue of all companies whose main office is at Tokyo or Taiwan?", "output": "SELECT sum(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What is the total revenue of all companies whose main office is at Tokyo or Taiwan?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5293, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the total revenue of companies with headquarters in Tokyo or Taiwan.", "output": "SELECT sum(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Return the total revenue of companies with headquarters in Tokyo or Taiwan.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5294, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of product that is produced by both companies Creative Labs and Sony.", "output": "SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find the name of product that is produced by both companies Creative Labs and Sony.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5295, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of products produced by both Creative Labs and Sony?", "output": "SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the names of products produced by both Creative Labs and Sony?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5296, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name, headquarter and founder of the manufacturer that has the highest revenue.", "output": "SELECT name , headquarter , founder FROM manufacturers ORDER BY revenue DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find the name, headquarter and founder of the manufacturer that has the highest revenue.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5297, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names, headquarters and founders of the company with the highest revenue?", "output": "SELECT name , headquarter , founder FROM manufacturers ORDER BY revenue DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the names, headquarters and founders of the company with the highest revenue?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5298, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name, headquarter and revenue of all manufacturers sorted by their revenue in the descending order.", "output": "SELECT name , headquarter , revenue FROM manufacturers ORDER BY revenue DESC", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find the name, headquarter and revenue of all manufacturers sorted by their revenue in the descending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5299, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names, headquarters and revenues for manufacturers, sorted by revenue descending?", "output": "SELECT name , headquarter , revenue FROM manufacturers ORDER BY revenue DESC", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the names, headquarters and revenues for manufacturers, sorted by revenue descending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5300, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of companies whose revenue is greater than the average revenue of all companies.", "output": "SELECT name FROM manufacturers WHERE revenue > (SELECT avg(revenue) FROM manufacturers)", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find the name of companies whose revenue is greater than the average revenue of all companies.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5301, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of manufacturers with revenue greater than the average of all revenues?", "output": "SELECT name FROM manufacturers WHERE revenue > (SELECT avg(revenue) FROM manufacturers)", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the names of manufacturers with revenue greater than the average of all revenues?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5302, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of companies whose revenue is smaller than the revenue of all companies based in Austin.", "output": "SELECT name FROM manufacturers WHERE revenue < (SELECT min(revenue) FROM manufacturers WHERE headquarter = 'Austin')", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find the name of companies whose revenue is smaller than the revenue of all companies based in Austin.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5303, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of companies with revenue less than the lowest revenue of any manufacturer in Austin?", "output": "SELECT name FROM manufacturers WHERE revenue < (SELECT min(revenue) FROM manufacturers WHERE headquarter = 'Austin')", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the names of companies with revenue less than the lowest revenue of any manufacturer in Austin?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5304, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total revenue of companies whose revenue is larger than the revenue of some companies based in Austin.", "output": "SELECT sum(revenue) FROM manufacturers WHERE revenue > (SELECT min(revenue) FROM manufacturers WHERE headquarter = 'Austin')", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find the total revenue of companies whose revenue is larger than the revenue of some companies based in Austin.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5305, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total revenue of companies with revenue greater than the lowest revenue of any manufacturer in Austin?", "output": "SELECT sum(revenue) FROM manufacturers WHERE revenue > (SELECT min(revenue) FROM manufacturers WHERE headquarter = 'Austin')", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What is the total revenue of companies with revenue greater than the lowest revenue of any manufacturer in Austin?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5306, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total revenue of companies of each founder.", "output": "SELECT sum(revenue) , founder FROM manufacturers GROUP BY founder", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find the total revenue of companies of each founder.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5307, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total revenue of companies started by founder?", "output": "SELECT sum(revenue) , founder FROM manufacturers GROUP BY founder", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What is the total revenue of companies started by founder?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5308, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and revenue of the company that earns the highest revenue in each city.", "output": "SELECT name , max(revenue) , Headquarter FROM manufacturers GROUP BY Headquarter", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find the name and revenue of the company that earns the highest revenue in each city.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5309, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and revenues of the companies with the highest revenues in each headquarter city?", "output": "SELECT name , max(revenue) , Headquarter FROM manufacturers GROUP BY Headquarter", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the names and revenues of the companies with the highest revenues in each headquarter city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5310, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total revenue for each manufacturer.", "output": "SELECT sum(revenue) , name FROM manufacturers GROUP BY name", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find the total revenue for each manufacturer.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5311, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total revenue of each manufacturer?", "output": "SELECT sum(revenue) , name FROM manufacturers GROUP BY name", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What is the total revenue of each manufacturer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5312, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average prices of all products from each manufacture, and list each company's name.", "output": "SELECT avg(T1.price) , T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find the average prices of all products from each manufacture, and list each company's name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5313, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average prices of products for each manufacturer?", "output": "SELECT avg(T1.price) , T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the average prices of products for each manufacturer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5314, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of different products that are produced by companies at different headquarter cities.", "output": "SELECT count(DISTINCT T1.name) , T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.Headquarter", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find the number of different products that are produced by companies at different headquarter cities.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5315, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different products are produced in each headquarter city?", "output": "SELECT count(DISTINCT T1.name) , T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.Headquarter", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: How many different products are produced in each headquarter city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5316, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find number of products which Sony does not make.", "output": "SELECT count(DISTINCT name) FROM products WHERE name NOT IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony')", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find number of products which Sony does not make.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5317, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many products are not made by Sony?", "output": "SELECT count(DISTINCT name) FROM products WHERE name NOT IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony')", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: How many products are not made by Sony?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5318, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of companies that do not make DVD drive.", "output": "SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T1.name = 'DVD drive'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find the name of companies that do not make DVD drive.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5319, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of companies that do not make DVD drives?", "output": "SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T1.name = 'DVD drive'", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the names of companies that do not make DVD drives?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5320, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of products for each manufacturer, showing the name of each company.", "output": "SELECT count(*) , T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find the number of products for each manufacturer, showing the name of each company.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5321, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many products are there for each manufacturer?", "output": "SELECT count(*) , T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: How many products are there for each manufacturer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5322, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Select the names of all the products in the store.", "output": "SELECT Name FROM Products", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Select the names of all the products in the store.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5323, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all products?", "output": "SELECT Name FROM Products", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the names of all products?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5324, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Select the names and the prices of all the products in the store.", "output": "SELECT name , price FROM products", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Select the names and the prices of all the products in the store.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5325, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and prices of all products in the store?", "output": "SELECT name , price FROM products", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the names and prices of all products in the store?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5326, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Select the name of the products with a price less than or equal to $200.", "output": "SELECT name FROM products WHERE price <= 200", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Select the name of the products with a price less than or equal to $200.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5327, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of products with price at most 200?", "output": "SELECT name FROM products WHERE price <= 200", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the names of products with price at most 200?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5328, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all information of all the products with a price between $60 and $120.", "output": "SELECT * FROM products WHERE price BETWEEN 60 AND 120", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Find all information of all the products with a price between $60 and $120.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5329, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is all the information of all the products that have a price between 60 and 120?", "output": "SELECT * FROM products WHERE price BETWEEN 60 AND 120", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What is all the information of all the products that have a price between 60 and 120?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5330, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Compute the average price of all the products.", "output": "SELECT avg(price) FROM products", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Compute the average price of all the products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5331, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average price across all products?", "output": "SELECT avg(price) FROM products", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What is the average price across all products?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5332, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Compute the average price of all products with manufacturer code equal to 2.", "output": "SELECT avg(price) FROM products WHERE Manufacturer = 2", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Compute the average price of all products with manufacturer code equal to 2.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5333, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average price of products with manufacturer codes equal to 2?", "output": "SELECT avg(price) FROM products WHERE Manufacturer = 2", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What is the average price of products with manufacturer codes equal to 2?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5334, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Compute the number of products with a price larger than or equal to $180.", "output": "SELECT count(*) FROM products WHERE price >= 180", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Compute the number of products with a price larger than or equal to $180.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5335, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many products have prices of at least 180?", "output": "SELECT count(*) FROM products WHERE price >= 180", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: How many products have prices of at least 180?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5336, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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).", "output": "SELECT name , price FROM products WHERE price >= 180 ORDER BY price DESC , name ASC", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: 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).,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5337, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and prices of products that cost at least 180, sorted by price decreasing and name ascending?", "output": "SELECT name , price FROM products WHERE price >= 180 ORDER BY price DESC , name ASC", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the names and prices of products that cost at least 180, sorted by price decreasing and name ascending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5338, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Select all the data from the products and each product's manufacturer.", "output": "SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Select all the data from the products and each product's manufacturer.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5339, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is all the product data, as well as each product's manufacturer?", "output": "SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What is all the product data, as well as each product's manufacturer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5340, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Select the average price of each manufacturer's products, showing only the manufacturer's code.", "output": "SELECT AVG(Price) , Manufacturer FROM Products GROUP BY Manufacturer", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Select the average price of each manufacturer's products, showing only the manufacturer's code.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5341, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average prices of products, grouped by manufacturer code?", "output": "SELECT AVG(Price) , Manufacturer FROM Products GROUP BY Manufacturer", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the average prices of products, grouped by manufacturer code?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5342, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Select the average price of each manufacturer's products, showing the manufacturer's name.", "output": "SELECT avg(T1.Price) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Select the average price of each manufacturer's products, showing the manufacturer's name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5343, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average prices of products, grouped by manufacturer name?", "output": "SELECT avg(T1.Price) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the average prices of products, grouped by manufacturer name?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5344, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Select the names of manufacturer whose products have an average price higher than or equal to $150.", "output": "SELECT avg(T1.Price) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name HAVING avg(T1.price) >= 150", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Select the names of manufacturer whose products have an average price higher than or equal to $150.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5345, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and average prices of products for manufacturers whose products cost on average 150 or more?", "output": "SELECT avg(T1.Price) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name HAVING avg(T1.price) >= 150", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the names and average prices of products for manufacturers whose products cost on average 150 or more?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5346, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Select the name and price of the cheapest product.", "output": "SELECT name , price FROM Products ORDER BY price ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Select the name and price of the cheapest product.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5347, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and price of the cheapest product?", "output": "SELECT name , price FROM Products ORDER BY price ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What is the name and price of the cheapest product?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5348, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Select the name of each manufacturer along with the name and price of its most expensive product.", "output": "SELECT T1.Name , max(T1.Price) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Select the name of each manufacturer along with the name and price of its most expensive product.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5349, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each manufacturer name, what are the names and prices of their most expensive product?", "output": "SELECT T1.Name , max(T1.Price) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: For each manufacturer name, what are the names and prices of their most expensive product?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5350, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Select the code of the product that is cheapest in each product category.", "output": "SELECT code , name , min(price) FROM products GROUP BY name", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: Select the code of the product that is cheapest in each product category.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "manufactory_1", "id": 5351, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the codes and names of the cheapest products in each category?", "output": "SELECT code , name , min(price) FROM products GROUP BY name", "input": "Based on \n# the table&column(database schema) information {'Manufacturers': ['Code', 'Name', 'Headquarter', 'Founder', 'Revenue'], 'Products': ['Code', 'Name', 'Price', 'Manufacturer']} and \n# the user question: What are the codes and names of the cheapest products in each category?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5352, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the problem log that is created most recently?", "output": "SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the problem log that is created most recently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5353, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which problem log was created most recently? Give me the log id.", "output": "SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which problem log was created most recently? Give me the log id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5354, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the oldest log id and its corresponding problem id?", "output": "SELECT problem_log_id , problem_id FROM problem_log ORDER BY log_entry_date LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the oldest log id and its corresponding problem id?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5355, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the oldest log id and its corresponding problem id.", "output": "SELECT problem_log_id , problem_id FROM problem_log ORDER BY log_entry_date LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the oldest log id and its corresponding problem id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5356, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the ids and dates of the logs for the problem whose id is 10.", "output": "SELECT problem_log_id , log_entry_date FROM problem_log WHERE problem_id = 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the ids and dates of the logs for the problem whose id is 10.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5357, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For the problem with id 10, return the ids and dates of its problem logs.", "output": "SELECT problem_log_id , log_entry_date FROM problem_log WHERE problem_id = 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For the problem with id 10, return the ids and dates of its problem logs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5358, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the log ids and their descriptions from the problem logs.", "output": "SELECT problem_log_id , log_entry_description FROM problem_log", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the log ids and their descriptions from the problem logs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5359, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the log id and entry description of each problem?", "output": "SELECT problem_log_id , log_entry_description FROM problem_log", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the log id and entry description of each problem?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5360, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the first and last names of all distinct staff members who are assigned to the problem whose id is 1.", "output": "SELECT DISTINCT staff_first_name , staff_last_name FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T2.problem_id = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the first and last names of all distinct staff members who are assigned to the problem whose id is 1.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5361, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which staff members are assigned to the problem with id 1? Give me their first and last names.", "output": "SELECT DISTINCT staff_first_name , staff_last_name FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T2.problem_id = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which staff members are assigned to the problem with id 1? Give me their first and last names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5362, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the problem id and log id which are assigned to the staff named Rylan Homenick.", "output": "SELECT DISTINCT T2.problem_id , T2.problem_log_id FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = \"Rylan\" AND T1.staff_last_name = \"Homenick\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the problem id and log id which are assigned to the staff named Rylan Homenick.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5363, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which problem id and log id are assigned to the staff named Rylan Homenick?", "output": "SELECT DISTINCT T2.problem_id , T2.problem_log_id FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = \"Rylan\" AND T1.staff_last_name = \"Homenick\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which problem id and log id are assigned to the staff named Rylan Homenick?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5364, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many problems are there for product voluptatem?", "output": "SELECT count(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = \"voluptatem\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many problems are there for product voluptatem?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5365, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many problems did the product called \"voluptatem\" have in record?", "output": "SELECT count(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = \"voluptatem\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many problems did the product called \"voluptatem\" have in record?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5366, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many problems does the product with the most problems have? List the number of the problems and product name.", "output": "SELECT count(*) , T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many problems does the product with the most problems have? List the number of the problems and product name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5367, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which product has the most problems? Give me the number of problems and the product name.", "output": "SELECT count(*) , T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which product has the most problems? Give me the number of problems and the product name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5368, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop.", "output": "SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Christop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5369, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which problems are reported by the staff with first name \"Christop\"? Show the descriptions of the problems.", "output": "SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Christop\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which problems are reported by the staff with first name \"Christop\"? Show the descriptions of the problems.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5370, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the ids of the problems that are reported by the staff whose last name is Bosco.", "output": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = \"Bosco\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the ids of the problems that are reported by the staff whose last name is Bosco.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5371, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which problems are reported by the staff with last name \"Bosco\"? Show the ids of the problems.", "output": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = \"Bosco\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which problems are reported by the staff with last name \"Bosco\"? Show the ids of the problems.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5372, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the problems which are reported after 1978-06-26?", "output": "SELECT problem_id FROM problems WHERE date_problem_reported > \"1978-06-26\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the problems which are reported after 1978-06-26?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5373, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the ids of the problems reported after 1978-06-26.", "output": "SELECT problem_id FROM problems WHERE date_problem_reported > \"1978-06-26\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the ids of the problems reported after 1978-06-26.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5374, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the problems which are reported before 1978-06-26?", "output": "SELECT problem_id FROM problems WHERE date_problem_reported < \"1978-06-26\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the problems which are reported before 1978-06-26?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5375, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which problems are reported before 1978-06-26? Give me the ids of the problems.", "output": "SELECT problem_id FROM problems WHERE date_problem_reported < \"1978-06-26\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which problems are reported before 1978-06-26? Give me the ids of the problems.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5376, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each product which has problems, what are the number of problems and the product id?", "output": "SELECT count(*) , T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each product which has problems, what are the number of problems and the product id?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5377, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each product with some problems, list the count of problems and the product id.", "output": "SELECT count(*) , T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each product with some problems, list the count of problems and the product id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5378, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each product that has problems, find the number of problems reported after 1986-11-13 and the product id?", "output": "SELECT count(*) , T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > \"1986-11-13\" GROUP BY T2.product_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each product that has problems, find the number of problems reported after 1986-11-13 and the product id?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5379, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT count(*) , T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T1.date_problem_reported > \"1986-11-13\" GROUP BY T2.product_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5380, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all the distinct product names in alphabetical order?", "output": "SELECT DISTINCT product_name FROM product ORDER BY product_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of all the distinct product names in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5381, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Sort all the distinct product names in alphabetical order.", "output": "SELECT DISTINCT product_name FROM product ORDER BY product_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Sort all the distinct product names in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5382, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the distinct product names ordered by product id?", "output": "SELECT DISTINCT product_name FROM product ORDER BY product_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the distinct product names ordered by product id?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5383, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the list of distinct product names sorted by product id?", "output": "SELECT DISTINCT product_name FROM product ORDER BY product_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the list of distinct product names sorted by product id?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5384, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the id of problems reported by the staff named Dameon Frami or Jolie Weber?", "output": "SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Dameon\" AND T2.staff_last_name = \"Frami\" UNION SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Jolie\" AND T2.staff_last_name = \"Weber\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the id of problems reported by the staff named Dameon Frami or Jolie Weber?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5385, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which problems were reported by the staff named Dameon Frami or Jolie Weber? Give me the ids of the problems.", "output": "SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Dameon\" AND T2.staff_last_name = \"Frami\" UNION SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Jolie\" AND T2.staff_last_name = \"Weber\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which problems were reported by the staff named Dameon Frami or Jolie Weber? Give me the ids of the problems.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5386, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst?", "output": "SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Christop\" AND T2.staff_last_name = \"Berge\" INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Ashley\" AND T2.staff_last_name = \"Medhurst\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5387, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For which product was there a problem reported by Christop Berge, with closure authorised by Ashley Medhurst? Return the product ids.", "output": "SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Christop\" AND T2.staff_last_name = \"Berge\" INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = \"Ashley\" AND T2.staff_last_name = \"Medhurst\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For which product was there a problem reported by Christop Berge, with closure authorised by Ashley Medhurst? Return the product ids.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5388, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte?", "output": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported < ( SELECT min(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = \"Lysanne\" AND T4.staff_last_name = \"Turcotte\" )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5389, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which problems were reported before the date of any problem reported by the staff Lysanne Turcotte? Give me the ids of the problems.", "output": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported < ( SELECT min(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = \"Lysanne\" AND T4.staff_last_name = \"Turcotte\" )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which problems were reported before the date of any problem reported by the staff Lysanne Turcotte? Give me the ids of the problems.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5390, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the problems reported after the date of any problems reported by Rylan Homenick?", "output": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported > ( SELECT max(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = \"Rylan\" AND T4.staff_last_name = \"Homenick\" )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the problems reported after the date of any problems reported by Rylan Homenick?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5391, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the ids of the problems reported after the date of any problems reported by the staff Rylan Homenick.", "output": "SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported > ( SELECT max(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = \"Rylan\" AND T4.staff_last_name = \"Homenick\" )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the ids of the problems reported after the date of any problems reported by the staff Rylan Homenick.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5392, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the top 3 products which have the largest number of problems?", "output": "SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name ORDER BY count(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the top 3 products which have the largest number of problems?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5393, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the three products that have the most problems?s", "output": "SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name ORDER BY count(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the three products that have the most problems?s,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5394, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the ids of the problems from the product \"voluptatem\" that are reported after 1995?", "output": "SELECT T1.problem_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = \"voluptatem\" AND T1.date_problem_reported > \"1995\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the ids of the problems from the product \"voluptatem\" that are reported after 1995?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5395, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the problems that are from the product \"voluptatem\" and are reported after 1995?", "output": "SELECT T1.problem_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = \"voluptatem\" AND T1.date_problem_reported > \"1995\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the problems that are from the product \"voluptatem\" and are reported after 1995?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5396, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first and last name of the staff members who reported problems from the product \"rem\" but not \"aut\"?", "output": "SELECT T3.staff_first_name , T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = \"rem\" EXCEPT SELECT T3.staff_first_name , T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = \"aut\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first and last name of the staff members who reported problems from the product \"rem\" but not \"aut\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5397, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which staff members who reported problems from the product \"rem\" but not \"aut\"? Give me their first and last names.", "output": "SELECT T3.staff_first_name , T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = \"rem\" EXCEPT SELECT T3.staff_first_name , T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = \"aut\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which staff members who reported problems from the product \"rem\" but not \"aut\"? Give me their first and last names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5398, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the products which have problems reported by both Lacey Bosco and Kenton Champlin?", "output": "SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = \"Lacey\" AND T3.staff_last_name = \"Bosco\" INTERSECT SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = \"Kenton\" AND T3.staff_last_name = \"Champlin\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the products which have problems reported by both Lacey Bosco and Kenton Champlin?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_software_problems", "id": 5399, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which products have problems reported by both the staff named Lacey Bosco and the staff named Kenton Champlin?", "output": "SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = \"Lacey\" AND T3.staff_last_name = \"Bosco\" INTERSECT SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T3.staff_first_name = \"Kenton\" AND T3.staff_last_name = \"Champlin\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which products have problems reported by both the staff named Lacey Bosco and the staff named Kenton Champlin?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5400, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many branches where have more than average number of memberships are there?", "output": "SELECT count(*) FROM branch WHERE membership_amount > (SELECT avg(membership_amount) FROM branch)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many branches where have more than average number of memberships are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5401, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of branches that have more than the average number of memberships?", "output": "SELECT count(*) FROM branch WHERE membership_amount > (SELECT avg(membership_amount) FROM branch)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of branches that have more than the average number of memberships?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5402, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show name, address road, and city for all branches sorted by open year.", "output": "SELECT name , address_road , city FROM branch ORDER BY open_year", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show name, address road, and city for all branches sorted by open year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5403, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names, address roads, and cities of the branches ordered by opening year?", "output": "SELECT name , address_road , city FROM branch ORDER BY open_year", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names, address roads, and cities of the branches ordered by opening year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5404, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are names for top three branches with most number of membership?", "output": "SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are names for top three branches with most number of membership?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5405, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names for the 3 branches that have the most memberships?", "output": "SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names for the 3 branches that have the most memberships?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5406, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all distinct city where branches with at least 100 memberships are located.", "output": "SELECT DISTINCT city FROM branch WHERE membership_amount >= 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all distinct city where branches with at least 100 memberships are located.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5407, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different cities that have more than 100 memberships?", "output": "SELECT DISTINCT city FROM branch WHERE membership_amount >= 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different cities that have more than 100 memberships?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5408, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all open years when at least two shops are opened.", "output": "SELECT open_year FROM branch GROUP BY open_year HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all open years when at least two shops are opened.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5409, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the opening years in which at least two shops opened?", "output": "SELECT open_year FROM branch GROUP BY open_year HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the opening years in which at least two shops opened?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5410, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London.", "output": "SELECT min(membership_amount) , max(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5411, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the minimum and maximum membership amounts for all branches that either opened in 2011 or are located in London?", "output": "SELECT min(membership_amount) , max(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the minimum and maximum membership amounts for all branches that either opened in 2011 or are located in London?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5412, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the city and the number of branches opened before 2010 for each city.", "output": "SELECT city , count(*) FROM branch WHERE open_year < 2010 GROUP BY city", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the city and the number of branches opened before 2010 for each city.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5413, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each city, how many branches opened before 2010?", "output": "SELECT city , count(*) FROM branch WHERE open_year < 2010 GROUP BY city", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each city, how many branches opened before 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5414, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different levels do members have?", "output": "SELECT count(DISTINCT LEVEL) FROM member", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different levels do members have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5415, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different membership levels?", "output": "SELECT count(DISTINCT LEVEL) FROM member", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different membership levels?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5416, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show card number, name, and hometown for all members in a descending order of level.", "output": "SELECT card_number , name , hometown FROM member ORDER BY LEVEL DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show card number, name, and hometown for all members in a descending order of level.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5417, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the card numbers, names, and hometowns of every member ordered by descending level?", "output": "SELECT card_number , name , hometown FROM member ORDER BY LEVEL DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the card numbers, names, and hometowns of every member ordered by descending level?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5418, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the membership level with most number of members.", "output": "SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the membership level with most number of members.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5419, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the membership level with the most people?", "output": "SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the membership level with the most people?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5420, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all member names and registered branch names sorted by register year.", "output": "SELECT T3.name , T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id ORDER BY T1.register_year", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all member names and registered branch names sorted by register year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5421, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the members and branches at which they are registered sorted by year of registration?", "output": "SELECT T3.name , T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id ORDER BY T1.register_year", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the members and branches at which they are registered sorted by year of registration?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5422, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all branch names with the number of members in each branch registered after 2015.", "output": "SELECT T2.name , count(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year > 2015 GROUP BY T2.branch_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all branch names with the number of members in each branch registered after 2015.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5423, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each branch id, what are the names of the branches that were registered after 2015?", "output": "SELECT T2.name , count(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year > 2015 GROUP BY T2.branch_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each branch id, what are the names of the branches that were registered after 2015?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5424, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show member names without any registered branch.", "output": "SELECT name FROM member WHERE member_id NOT IN (SELECT member_id FROM membership_register_branch)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show member names without any registered branch.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5425, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the members that have never registered at any branch?", "output": "SELECT name FROM member WHERE member_id NOT IN (SELECT member_id FROM membership_register_branch)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the members that have never registered at any branch?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5426, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the branch name and city without any registered members.", "output": "SELECT name , city FROM branch WHERE branch_id NOT IN (SELECT branch_id FROM membership_register_branch)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the branch name and city without any registered members.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5427, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and cities of the branches that do not have any registered members?", "output": "SELECT name , city FROM branch WHERE branch_id NOT IN (SELECT branch_id FROM membership_register_branch)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and cities of the branches that do not have any registered members?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5428, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and open year for the branch with most number of memberships registered in 2016?", "output": "SELECT T2.name , T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year = 2016 GROUP BY T2.branch_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and open year for the branch with most number of memberships registered in 2016?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5429, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and opening year for the branch that registered the most members in 2016?", "output": "SELECT T2.name , T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T1.register_year = 2016 GROUP BY T2.branch_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and opening year for the branch that registered the most members in 2016?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5430, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the member name and hometown who registered a branch in 2016.", "output": "SELECT T2.name , T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T1.register_year = 2016", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the member name and hometown who registered a branch in 2016.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5431, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the member names and hometowns of those who registered at a branch in 2016?", "output": "SELECT T2.name , T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T1.register_year = 2016", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the member names and hometowns of those who registered at a branch in 2016?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5432, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all city with a branch opened in 2001 and a branch with more than 100 membership.", "output": "SELECT city FROM branch WHERE open_year = 2001 AND membership_amount > 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all city with a branch opened in 2001 and a branch with more than 100 membership.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5433, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the cities that have a branch that opened in 2001 and a branch with more than 100 members?", "output": "SELECT city FROM branch WHERE open_year = 2001 AND membership_amount > 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the cities that have a branch that opened in 2001 and a branch with more than 100 members?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5434, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all cities without a branch having more than 100 memberships.", "output": "SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount > 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all cities without a branch having more than 100 memberships.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5435, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the cities that do not have any branches with more than 100 members?", "output": "SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount > 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the cities that do not have any branches with more than 100 members?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5436, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the sum of total pounds of purchase in year 2018 for all branches in London?", "output": "SELECT sum(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T2.city = 'London' AND T1.year = 2018", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the sum of total pounds of purchase in year 2018 for all branches in London?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5437, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many total pounds were purchased in the year 2018 at all London branches?", "output": "SELECT sum(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id WHERE T2.city = 'London' AND T1.year = 2018", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many total pounds were purchased in the year 2018 at all London branches?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5438, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of purchases for members with level 6?", "output": "SELECT count(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of purchases for members with level 6?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5439, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the total purchases for members rated at level 6?", "output": "SELECT count(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.level = 6", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the total purchases for members rated at level 6?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5440, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of branches where have some members whose hometown is in Louisville, Kentucky and some in Hiram, Georgia.", "output": "SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Louisville , Kentucky' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Hiram , Georgia'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of branches where have some members whose hometown is in Louisville, Kentucky and some in Hiram, Georgia.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5441, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the branches that have some members with a hometown in Louisville, Kentucky and also those from Hiram, Goergia?", "output": "SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Louisville , Kentucky' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Hiram , Georgia'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the branches that have some members with a hometown in Louisville, Kentucky and also those from Hiram, Goergia?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5442, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "list the card number of all members whose hometown address includes word \"Kentucky\".", "output": "SELECT card_number FROM member WHERE Hometown LIKE \"%Kentucky%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: list the card number of all members whose hometown address includes word \"Kentucky\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "shop_membership", "id": 5443, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the card numbers of members from Kentucky?", "output": "SELECT card_number FROM member WHERE Hometown LIKE \"%Kentucky%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the card numbers of members from Kentucky?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5444, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of students in total.", "output": "SELECT count(*) FROM STUDENT", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of students in total.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5445, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are there in total?", "output": "SELECT count(*) FROM STUDENT", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students are there in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5446, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of voting records in total.", "output": "SELECT count(*) FROM VOTING_RECORD", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of voting records in total.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5447, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many voting records do we have?", "output": "SELECT count(*) FROM VOTING_RECORD", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many voting records do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5448, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct number of president votes.", "output": "SELECT count(DISTINCT President_Vote) FROM VOTING_RECORD", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the distinct number of president votes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5449, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct president votes are recorded?", "output": "SELECT count(DISTINCT President_Vote) FROM VOTING_RECORD", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct president votes are recorded?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5450, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the maximum age of all the students.", "output": "SELECT max(Age) FROM STUDENT", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the maximum age of all the students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5451, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the oldest age among the students?", "output": "SELECT max(Age) FROM STUDENT", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the oldest age among the students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5452, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last names of students with major 50.", "output": "SELECT LName FROM STUDENT WHERE Major = 50", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the last names of students with major 50.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5453, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the last names of students studying major 50?", "output": "SELECT LName FROM STUDENT WHERE Major = 50", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the last names of students studying major 50?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5454, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of students with age above 22.", "output": "SELECT Fname FROM STUDENT WHERE Age > 22", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names of students with age above 22.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5455, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all the students aged above 22?", "output": "SELECT Fname FROM STUDENT WHERE Age > 22", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of all the students aged above 22?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5456, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the majors of male (sex is M) students?", "output": "SELECT Major FROM STUDENT WHERE Sex = \"M\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the majors of male (sex is M) students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5457, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the major of each male student.", "output": "SELECT Major FROM STUDENT WHERE Sex = \"M\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the major of each male student.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5458, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average age of female (sex is F) students?", "output": "SELECT avg(Age) FROM STUDENT WHERE Sex = \"F\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average age of female (sex is F) students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5459, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average age of female students.", "output": "SELECT avg(Age) FROM STUDENT WHERE Sex = \"F\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average age of female students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5460, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum and minimum age of students with major 600?", "output": "SELECT max(Age) , min(Age) FROM STUDENT WHERE Major = 600", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum and minimum age of students with major 600?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5461, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Tell me the ages of the oldest and youngest students studying major 600.", "output": "SELECT max(Age) , min(Age) FROM STUDENT WHERE Major = 600", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Tell me the ages of the oldest and youngest students studying major 600.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5462, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who are the advisors for students that live in a city with city code \"BAL\"?", "output": "SELECT Advisor FROM STUDENT WHERE city_code = \"BAL\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who are the advisors for students that live in a city with city code \"BAL\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5463, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the advisors of the students whose city of residence has city code \"BAL\".", "output": "SELECT Advisor FROM STUDENT WHERE city_code = \"BAL\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the advisors of the students whose city of residence has city code \"BAL\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5464, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct secretary votes in the fall election cycle?", "output": "SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = \"Fall\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct secretary votes in the fall election cycle?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5465, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return all the distinct secretary votes made in the fall election cycle.", "output": "SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE = \"Fall\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return all the distinct secretary votes made in the fall election cycle.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5466, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct president votes on 08/30/2015?", "output": "SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date = \"08/30/2015\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct president votes on 08/30/2015?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5467, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all the distinct president votes made on 08/30/2015.", "output": "SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date = \"08/30/2015\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all the distinct president votes made on 08/30/2015.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5468, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Report the distinct registration date and the election cycle.", "output": "SELECT DISTINCT Registration_Date , Election_Cycle FROM VOTING_RECORD", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Report the distinct registration date and the election cycle.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5469, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct registration dates and the election cycles?", "output": "SELECT DISTINCT Registration_Date , Election_Cycle FROM VOTING_RECORD", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct registration dates and the election cycles?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5470, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Report the distinct president vote and the vice president vote.", "output": "SELECT DISTINCT President_Vote , VICE_President_Vote FROM VOTING_RECORD", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Report the distinct president vote and the vice president vote.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5471, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the distinct president votes and the vice president votes.", "output": "SELECT DISTINCT President_Vote , VICE_President_Vote FROM VOTING_RECORD", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the distinct president votes and the vice president votes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5472, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct last names of the students who have class president votes.", "output": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_President_VOTE", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the distinct last names of the students who have class president votes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5473, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct last names of the students who have class president votes?", "output": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_President_VOTE", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct last names of the students who have class president votes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5474, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct first names of the students who have class senator votes.", "output": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the distinct first names of the students who have class senator votes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5475, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct first names of the students who have class president votes?", "output": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.CLASS_Senator_VOTE", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct first names of the students who have class president votes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5476, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct ages of students who have secretary votes in the fall election cycle.", "output": "SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = \"Fall\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the distinct ages of students who have secretary votes in the fall election cycle.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5477, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct ages of students who have secretary votes in the fall election cycle?", "output": "SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = \"Fall\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct ages of students who have secretary votes in the fall election cycle?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5478, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct Advisor of students who have treasurer votes in the spring election cycle.", "output": "SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = \"Spring\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the distinct Advisor of students who have treasurer votes in the spring election cycle.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5479, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who served as an advisor for students who have treasurer votes in the spring election cycle?", "output": "SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote WHERE T2.Election_Cycle = \"Spring\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who served as an advisor for students who have treasurer votes in the spring election cycle?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5480, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct majors of students who have treasurer votes.", "output": "SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the distinct majors of students who have treasurer votes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5481, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct majors that students with treasurer votes are studying?", "output": "SELECT DISTINCT T1.Major FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Treasurer_Vote", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct majors that students with treasurer votes are studying?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5482, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first and last names of all the female (sex is F) students who have president votes.", "output": "SELECT DISTINCT T1.Fname , T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.President_VOTE WHERE T1.sex = \"F\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first and last names of all the female (sex is F) students who have president votes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5483, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of all the female students who have president votes?", "output": "SELECT DISTINCT T1.Fname , T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.President_VOTE WHERE T1.sex = \"F\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last names of all the female students who have president votes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5484, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first and last name of all the students of age 18 who have vice president votes.", "output": "SELECT DISTINCT T1.Fname , T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_President_VOTE WHERE T1.age = 18", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first and last name of all the students of age 18 who have vice president votes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5485, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names and last names of the students who are 18 years old and have vice president votes.", "output": "SELECT DISTINCT T1.Fname , T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_President_VOTE WHERE T1.age = 18", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names and last names of the students who are 18 years old and have vice president votes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5486, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many male (sex is M) students have class senator votes in the fall election cycle?", "output": "SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.Sex = \"M\" AND T2.Election_Cycle = \"Fall\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many male (sex is M) students have class senator votes in the fall election cycle?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5487, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of male students who had class senator votes in the fall election cycle.", "output": "SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.Sex = \"M\" AND T2.Election_Cycle = \"Fall\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of male students who had class senator votes in the fall election cycle.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5488, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle.", "output": "SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.city_code = \"NYC\" AND T2.Election_Cycle = \"Spring\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5489, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which students live in the city with code \"NYC\" and have class senator votes in the spring election cycle? Count the numbers.", "output": "SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.city_code = \"NYC\" AND T2.Election_Cycle = \"Spring\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which students live in the city with code \"NYC\" and have class senator votes in the spring election cycle? Count the numbers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5490, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average age of students who live in the city with code \"NYC\" and have secretary votes in the spring election cycle.", "output": "SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.city_code = \"NYC\" AND T2.Election_Cycle = \"Spring\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average age of students who live in the city with code \"NYC\" and have secretary votes in the spring election cycle.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5491, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average age of students who have city code \"NYC\" and have secretary votes for the spring election cycle?", "output": "SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.city_code = \"NYC\" AND T2.Election_Cycle = \"Spring\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average age of students who have city code \"NYC\" and have secretary votes for the spring election cycle?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5492, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average age of female (sex is F) students who have secretary votes in the spring election cycle.", "output": "SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.Sex = \"F\" AND T2.Election_Cycle = \"Spring\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average age of female (sex is F) students who have secretary votes in the spring election cycle.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5493, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average age of the female students with secretary votes in the spring election cycle?", "output": "SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.Sex = \"F\" AND T2.Election_Cycle = \"Spring\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average age of the female students with secretary votes in the spring election cycle?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5494, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct first names of all the students who have vice president votes and whose city code is not PIT.", "output": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code = \"PIT\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the distinct first names of all the students who have vice president votes and whose city code is not PIT.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5495, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code = \"PIT\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5496, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct last names of all the students who have president votes and whose advisor is not 2192.", "output": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = \"2192\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the distinct last names of all the students who have president votes and whose advisor is not 2192.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5497, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct last names of the students who have president votes but do not have 2192 as the advisor?", "output": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = \"2192\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct last names of the students who have president votes but do not have 2192 as the advisor?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5498, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct last names of all the students who have president votes and whose advisor is 8741.", "output": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = \"8741\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the distinct last names of all the students who have president votes and whose advisor is 8741.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5499, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct last names of the students who have president votes and have 8741 as the advisor?", "output": "SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote INTERSECT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = \"8741\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct last names of the students who have president votes and have 8741 as the advisor?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5500, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each advisor, report the total number of students advised by him or her.", "output": "SELECT Advisor , count(*) FROM STUDENT GROUP BY Advisor", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each advisor, report the total number of students advised by him or her.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5501, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students does each advisor have?", "output": "SELECT Advisor , count(*) FROM STUDENT GROUP BY Advisor", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students does each advisor have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5502, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Report all advisors that advise more than 2 students.", "output": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Report all advisors that advise more than 2 students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5503, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which advisors have more than two students?", "output": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which advisors have more than two students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5504, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Report all majors that have less than 3 students.", "output": "SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Report all majors that have less than 3 students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5505, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the majors only less than three students are studying?", "output": "SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the majors only less than three students are studying?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5506, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each election cycle, report the number of voting records.", "output": "SELECT Election_Cycle , count(*) FROM VOTING_RECORD GROUP BY Election_Cycle", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each election cycle, report the number of voting records.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5507, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of voting records for each election cycle.", "output": "SELECT Election_Cycle , count(*) FROM VOTING_RECORD GROUP BY Election_Cycle", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of voting records for each election cycle.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5508, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which major has the most students?", "output": "SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which major has the most students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5509, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the major that is studied by the largest number of students.", "output": "SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the major that is studied by the largest number of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5510, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most common major among female (sex is F) students?", "output": "SELECT Major FROM STUDENT WHERE Sex = \"F\" GROUP BY major ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most common major among female (sex is F) students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5511, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the major that is studied by the most female students.", "output": "SELECT Major FROM STUDENT WHERE Sex = \"F\" GROUP BY major ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the major that is studied by the most female students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5512, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the city_code of the city that the most students live in?", "output": "SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the city_code of the city that the most students live in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5513, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the code of the city that has the most students.", "output": "SELECT city_code FROM STUDENT GROUP BY city_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the code of the city that has the most students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5514, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Report the distinct advisors who have more than 2 students.", "output": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Report the distinct advisors who have more than 2 students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "voter_2", "id": 5515, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which advisors are advising more than 2 students?", "output": "SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which advisors are advising more than 2 students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5516, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many products are there?", "output": "SELECT count(*) FROM products", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many products are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5517, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of products.", "output": "SELECT count(*) FROM products", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5518, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many colors are there?", "output": "SELECT count(*) FROM ref_colors", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many colors are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5519, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of colors.", "output": "SELECT count(*) FROM ref_colors", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of colors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5520, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many characteristics are there?", "output": "SELECT count(*) FROM CHARACTERISTICS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many characteristics are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5521, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of characteristics.", "output": "SELECT count(*) FROM CHARACTERISTICS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of characteristics.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5522, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and buying prices of all the products?", "output": "SELECT product_name , typical_buying_price FROM products", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and buying prices of all the products?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5523, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names and typical buying prices for all products.", "output": "SELECT product_name , typical_buying_price FROM products", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names and typical buying prices for all products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5524, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the description of all the colors.", "output": "SELECT color_description FROM ref_colors", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the description of all the colors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5525, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the descriptions for each color?", "output": "SELECT color_description FROM ref_colors", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the descriptions for each color?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5526, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all the product characteristics.", "output": "SELECT DISTINCT characteristic_name FROM CHARACTERISTICS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all the product characteristics.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5527, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different names of the product characteristics?", "output": "SELECT DISTINCT characteristic_name FROM CHARACTERISTICS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different names of the product characteristics?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5528, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of products with category \"Spices\"?", "output": "SELECT product_name FROM products WHERE product_category_code = \"Spices\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of products with category \"Spices\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5529, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of products in the category 'Spices'.", "output": "SELECT product_name FROM products WHERE product_category_code = \"Spices\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names of products in the category 'Spices'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5530, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names, color descriptions and product descriptions of products with category \"Herbs\".", "output": "SELECT T1.product_name , T2.color_description , T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = \"Herbs\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names, color descriptions and product descriptions of products with category \"Herbs\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5531, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names, color descriptions, and product descriptions for products in the 'Herbs' category?", "output": "SELECT T1.product_name , T2.color_description , T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code = T2.color_code WHERE product_category_code = \"Herbs\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names, color descriptions, and product descriptions for products in the 'Herbs' category?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5532, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many products are there under the category \"Seeds\"?", "output": "SELECT count(*) FROM products WHERE product_category_code = \"Seeds\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many products are there under the category \"Seeds\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5533, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of products in the category 'Seeds'.", "output": "SELECT count(*) FROM products WHERE product_category_code = \"Seeds\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of products in the category 'Seeds'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5534, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of products with category \"Spices\" and typically sold above 1000.", "output": "SELECT count(*) FROM products WHERE product_category_code = \"Spices\" AND typical_buying_price > 1000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of products with category \"Spices\" and typically sold above 1000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5535, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many products are in the 'Spices' category and have a typical price of over 1000?", "output": "SELECT count(*) FROM products WHERE product_category_code = \"Spices\" AND typical_buying_price > 1000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many products are in the 'Spices' category and have a typical price of over 1000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5536, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the category and typical buying price of the product with name \"cumin\"?", "output": "SELECT product_category_code , typical_buying_price FROM products WHERE product_name = \"cumin\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the category and typical buying price of the product with name \"cumin\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5537, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the category code and typical price of 'cumin'.", "output": "SELECT product_category_code , typical_buying_price FROM products WHERE product_name = \"cumin\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the category code and typical price of 'cumin'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5538, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which category does the product named \"flax\" belong to?", "output": "SELECT product_category_code FROM products WHERE product_name = \"flax\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which category does the product named \"flax\" belong to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5539, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the code of the category that the product with the name 'flax' belongs to?", "output": "SELECT product_category_code FROM products WHERE product_name = \"flax\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the code of the category that the product with the name 'flax' belongs to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5540, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the product with the color description 'yellow'?", "output": "SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the product with the color description 'yellow'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5541, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the name of the products that have a color description 'yellow'.", "output": "SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the name of the products that have a color description 'yellow'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5542, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the category descriptions of the products whose descriptions include letter 't'.", "output": "SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the category descriptions of the products whose descriptions include letter 't'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5543, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the descriptions of the categories that products with product descriptions that contain the letter t are in?", "output": "SELECT T1.product_category_description FROM ref_product_categories AS T1 JOIN products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the descriptions of the categories that products with product descriptions that contain the letter t are in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5544, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the color description of the product with name \"catnip\"?", "output": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = \"catnip\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the color description of the product with name \"catnip\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5545, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the color description for the product 'catnip'.", "output": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = \"catnip\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the color description for the product 'catnip'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5546, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the color code and description of the product named \"chervil\"?", "output": "SELECT t1.color_code , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = \"chervil\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the color code and description of the product named \"chervil\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5547, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the color code and description for the product with the name 'chervil'.", "output": "SELECT t1.color_code , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = \"chervil\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the color code and description for the product with the name 'chervil'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5548, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id and color description of the products with at least 2 characteristics.", "output": "SELECT t1.product_id , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id and color description of the products with at least 2 characteristics.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5549, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the product ids and color descriptions for products with two or more characteristics?", "output": "SELECT t1.product_id , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code JOIN product_characteristics AS t3 ON t1.product_id = t3.product_id GROUP BY t1.product_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the product ids and color descriptions for products with two or more characteristics?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5550, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the product names with the color description \"white\".", "output": "SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"white\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the product names with the color description \"white\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5551, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of products with 'white' as their color description?", "output": "SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"white\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of products with 'white' as their color description?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5552, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and typical buying and selling prices of the products that have color described as \"yellow\"?", "output": "SELECT t1.product_name , t1.typical_buying_price , t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"yellow\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name and typical buying and selling prices of the products that have color described as \"yellow\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5553, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names and typical buying and selling prices for products that have 'yellow' as their color description.", "output": "SELECT t1.product_name , t1.typical_buying_price , t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = \"yellow\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names and typical buying and selling prices for products that have 'yellow' as their color description.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5554, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many characteristics does the product named \"sesame\" have?", "output": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = \"sesame\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many characteristics does the product named \"sesame\" have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5555, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of characteristics the product 'sesame' has.", "output": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = \"sesame\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of characteristics the product 'sesame' has.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5556, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct characteristic names does the product \"cumin\" have?", "output": "SELECT count(DISTINCT t3.characteristic_name) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"sesame\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct characteristic names does the product \"cumin\" have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5557, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different characteristic names the product 'cumin' has.", "output": "SELECT count(DISTINCT t3.characteristic_name) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"sesame\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of different characteristic names the product 'cumin' has.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5558, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the characteristic names of product \"sesame\"?", "output": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"sesame\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the characteristic names of product \"sesame\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5559, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the characteristic names of the 'sesame' product.", "output": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"sesame\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the characteristic names of the 'sesame' product.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5560, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the characteristic names and data types of product \"cumin\".", "output": "SELECT t3.characteristic_name , t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"cumin\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the characteristic names and data types of product \"cumin\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5561, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and data types of the characteristics of the 'cumin' product?", "output": "SELECT t3.characteristic_name , t3.characteristic_data_type FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"cumin\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and data types of the characteristics of the 'cumin' product?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5562, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all characteristics of product named \"sesame\" with type code \"Grade\".", "output": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"sesame\" AND t3.characteristic_type_code = \"Grade\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all characteristics of product named \"sesame\" with type code \"Grade\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5563, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the characteristics of the product 'sesame' that have the characteristic type code 'Grade'?", "output": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"sesame\" AND t3.characteristic_type_code = \"Grade\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the characteristics of the product 'sesame' that have the characteristic type code 'Grade'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5564, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many characteristics does the product named \"laurel\" have?", "output": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"laurel\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many characteristics does the product named \"laurel\" have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5565, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of characteristics of the product named 'laurel'.", "output": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"laurel\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of characteristics of the product named 'laurel'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5566, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of characteristics that the product \"flax\" has.", "output": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"flax\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of characteristics that the product \"flax\" has.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5567, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of characteristics of the 'flax' product.", "output": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = \"flax\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of characteristics of the 'flax' product.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5568, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the products that have the color description \"red\" and have the characteristic name \"fast\".", "output": "SELECT product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = \"red\" AND t3.characteristic_name = \"fast\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the products that have the color description \"red\" and have the characteristic name \"fast\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5569, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the products that have a color description of 'red' and the 'fast' characteristic?", "output": "SELECT product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = \"red\" AND t3.characteristic_name = \"fast\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the products that have a color description of 'red' and the 'fast' characteristic?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5570, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many products have the characteristic named \"hot\"?", "output": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = \"hot\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many products have the characteristic named \"hot\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5571, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of products with the 'hot' charactersitic.", "output": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = \"hot\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of products with the 'hot' charactersitic.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5572, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the all the distinct names of the products with the characteristic name 'warm'.", "output": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = \"warm\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the all the distinct names of the products with the characteristic name 'warm'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5573, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different product names for products that have the 'warm' characteristic:?", "output": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t3.characteristic_name = \"warm\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different product names for products that have the 'warm' characteristic:?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5574, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of the products that have their color described as \"red\" and have a characteristic named \"slow\".", "output": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = \"red\" AND t3.characteristic_name = \"slow\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of the products that have their color described as \"red\" and have a characteristic named \"slow\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5575, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many products have the color description 'red' and the characteristic name 'slow'?", "output": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = \"red\" AND t3.characteristic_name = \"slow\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many products have the color description 'red' and the characteristic name 'slow'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5576, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the products that have the color description \"white\" or have the characteristic name \"hot\".", "output": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = \"white\" OR t3.characteristic_name = \"hot\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the products that have the color description \"white\" or have the characteristic name \"hot\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5577, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many products have their color described as 'white' or have a characteristic with the name 'hot'?", "output": "SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = \"white\" OR t3.characteristic_name = \"hot\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many products have their color described as 'white' or have a characteristic with the name 'hot'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5578, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the unit of measuerment of the product category code \"Herbs\"?", "output": "SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = \"Herbs\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the unit of measuerment of the product category code \"Herbs\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5579, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the unit of measure for 'Herb' products.", "output": "SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = \"Herbs\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the unit of measure for 'Herb' products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5580, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the product category description of the product category with code \"Spices\".", "output": "SELECT product_category_description FROM ref_product_categories WHERE product_category_code = \"Spices\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the product category description of the product category with code \"Spices\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5581, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description of the product category with the code 'Spices'?", "output": "SELECT product_category_description FROM ref_product_categories WHERE product_category_code = \"Spices\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description of the product category with the code 'Spices'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5582, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the product category description and unit of measurement of category \"Herbs\"?", "output": "SELECT product_category_description , unit_of_measure FROM ref_product_categories WHERE product_category_code = \"Herbs\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the product category description and unit of measurement of category \"Herbs\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5583, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the description and unit of measurement for products in the 'Herbs' category.", "output": "SELECT product_category_description , unit_of_measure FROM ref_product_categories WHERE product_category_code = \"Herbs\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the description and unit of measurement for products in the 'Herbs' category.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5584, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the unit of measurement of product named \"cumin\"?", "output": "SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = \"cumin\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the unit of measurement of product named \"cumin\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5585, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the unit of measure for the product with the name 'cumin'.", "output": "SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = \"cumin\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the unit of measure for the product with the name 'cumin'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5586, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the unit of measurement and product category code of product named \"chervil\".", "output": "SELECT t2.unit_of_measure , t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = \"chervil\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the unit of measurement and product category code of product named \"chervil\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5587, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the unit of measure and category code for the 'chervil' product?", "output": "SELECT t2.unit_of_measure , t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = \"chervil\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the unit of measure and category code for the 'chervil' product?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5588, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the product names that are colored 'white' but do not have unit of measurement \"Handful\".", "output": "SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = \"white\" AND t2.unit_of_measure != \"Handful\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the product names that are colored 'white' but do not have unit of measurement \"Handful\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5589, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'?", "output": "SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code = t3.color_code WHERE t3.color_description = \"white\" AND t2.unit_of_measure != \"Handful\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5590, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description of the color for most products?", "output": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description of the color for most products?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5591, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the color description that is most common across all products.", "output": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the color description that is most common across all products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5592, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description of the color used by least products?", "output": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description of the color used by least products?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5593, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the color description that is least common across products.", "output": "SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the color description that is least common across products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5594, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the characteristic name used by most number of the products?", "output": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the characteristic name used by most number of the products?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5595, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name of the characteristic that is most common across all products.", "output": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the name of the characteristic that is most common across all products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5596, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names, details and data types of the characteristics which are never used by any product?", "output": "SELECT characteristic_name , other_characteristic_details , characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name , t1.other_characteristic_details , t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names, details and data types of the characteristics which are never used by any product?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5597, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the names, details, and data types of characteristics that are not found in any product.", "output": "SELECT characteristic_name , other_characteristic_details , characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name , t1.other_characteristic_details , t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the names, details, and data types of characteristics that are not found in any product.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5598, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are characteristic names used at least twice across all products?", "output": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are characteristic names used at least twice across all products?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5599, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the names of characteristics that are in two or more products?", "output": "SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id = t3.characteristic_id GROUP BY t3.characteristic_name HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the names of characteristics that are in two or more products?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5600, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many colors are never used by any product?", "output": "SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many colors are never used by any product?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "products_gen_characteristics", "id": 5601, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of colors that are not used in any products.", "output": "SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of colors that are not used in any products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5602, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many events are there?", "output": "SELECT count(*) FROM event", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many events are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5603, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the event names by year from the most recent to the oldest.", "output": "SELECT name FROM event ORDER BY YEAR DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the event names by year from the most recent to the oldest.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5604, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the event that happened in the most recent year?", "output": "SELECT name FROM event ORDER BY YEAR DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the event that happened in the most recent year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5605, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many stadiums are there?", "output": "SELECT count(*) FROM stadium", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many stadiums are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5606, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the stadium that has the maximum capacity.", "output": "SELECT name FROM stadium ORDER BY capacity DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the stadium that has the maximum capacity.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5607, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of stadiums whose capacity is smaller than the average capacity.", "output": "SELECT name FROM stadium WHERE capacity < (SELECT avg(capacity) FROM stadium)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of stadiums whose capacity is smaller than the average capacity.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5608, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the country that has the most stadiums.", "output": "SELECT country FROM stadium GROUP BY country ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the country that has the most stadiums.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5609, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which country has at most 3 stadiums listed?", "output": "SELECT country FROM stadium GROUP BY country HAVING count(*) <= 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which country has at most 3 stadiums listed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5610, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000?", "output": "SELECT country FROM stadium WHERE capacity > 60000 INTERSECT SELECT country FROM stadium WHERE capacity < 50000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5611, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many cities have a stadium that was opened before the year of 2006?", "output": "SELECT count(DISTINCT city) FROM stadium WHERE opening_year < 2006", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many cities have a stadium that was opened before the year of 2006?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5612, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many stadiums does each country have?", "output": "SELECT country , count(*) FROM stadium GROUP BY country", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many stadiums does each country have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5613, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which countries do not have a stadium that was opened after 2006?", "output": "SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year > 2006", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which countries do not have a stadium that was opened after 2006?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5614, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many stadiums are not in country \"Russia\"?", "output": "SELECT count(*) FROM stadium WHERE country != 'Russia'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many stadiums are not in country \"Russia\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5615, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all swimmers, sorted by their 100 meter scores in ascending order.", "output": "SELECT name FROM swimmer ORDER BY meter_100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of all swimmers, sorted by their 100 meter scores in ascending order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5616, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different countries are all the swimmers from?", "output": "SELECT count(DISTINCT nationality) FROM swimmer", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different countries are all the swimmers from?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5617, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List countries that have more than one swimmer.", "output": "SELECT nationality , count(*) FROM swimmer GROUP BY nationality HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List countries that have more than one swimmer.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5618, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all 200 meter and 300 meter results of swimmers with nationality \"Australia\".", "output": "SELECT meter_200 , meter_300 FROM swimmer WHERE nationality = 'Australia'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all 200 meter and 300 meter results of swimmers with nationality \"Australia\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5619, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of swimmers who has a result of \"win\".", "output": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of swimmers who has a result of \"win\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5620, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the stadium which held the most events?", "output": "SELECT t1.name FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the stadium which held the most events?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5621, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and capacity of the stadium where the event named \"World Junior\" happened.", "output": "SELECT t1.name , t1.capacity FROM stadium AS t1 JOIN event AS t2 ON t1.id = t2.stadium_id WHERE t2.name = 'World Junior'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and capacity of the stadium where the event named \"World Junior\" happened.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5622, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of stadiums which have never had any event.", "output": "SELECT name FROM stadium WHERE id NOT IN (SELECT stadium_id FROM event)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of stadiums which have never had any event.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5623, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the swimmer who has the most records.", "output": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id GROUP BY t2.swimmer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the swimmer who has the most records.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5624, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the swimmer who has at least 2 records.", "output": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id GROUP BY t2.swimmer_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the swimmer who has at least 2 records.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5625, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and nationality of the swimmer who has won (i.e., has a result of \"win\") more than 1 time.", "output": "SELECT t1.name , t1.nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' GROUP BY t2.swimmer_id HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and nationality of the swimmer who has won (i.e., has a result of \"win\") more than 1 time.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5626, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the swimmers who have no record.", "output": "SELECT name FROM swimmer WHERE id NOT IN (SELECT swimmer_id FROM record)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the swimmers who have no record.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5627, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the swimmers who have both \"win\" and \"loss\" results in the record.", "output": "SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Win' INTERSECT SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id WHERE RESULT = 'Loss'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the swimmers who have both \"win\" and \"loss\" results in the record.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5628, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of stadiums that some Australian swimmers have been to.", "output": "SELECT t4.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id JOIN event AS t3 ON t2.event_id = t3.id JOIN stadium AS t4 ON t4.id = t3.stadium_id WHERE t1.nationality = 'Australia'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of stadiums that some Australian swimmers have been to.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5629, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of stadiums that the most swimmers have been to.", "output": "SELECT t3.name FROM record AS t1 JOIN event AS t2 ON t1.event_id = t2.id JOIN stadium AS t3 ON t3.id = t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of stadiums that the most swimmers have been to.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5630, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all details for each swimmer.", "output": "SELECT * FROM swimmer", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all details for each swimmer.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "swimming", "id": 5631, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average capacity of the stadiums that were opened in year 2005?", "output": "SELECT avg(capacity) FROM stadium WHERE opening_year = 2005", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average capacity of the stadiums that were opened in year 2005?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5632, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many railways are there?", "output": "SELECT count(*) FROM railway", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many railways are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5633, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the builders of railways in ascending alphabetical order.", "output": "SELECT Builder FROM railway ORDER BY Builder ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the builders of railways in ascending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5634, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the wheels and locations of the railways.", "output": "SELECT Wheels , LOCATION FROM railway", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the wheels and locations of the railways.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5635, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum level of managers in countries that are not \"Australia\"?", "output": "SELECT max(LEVEL) FROM manager WHERE Country != \"Australia\t\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the maximum level of managers in countries that are not \"Australia\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5636, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average age for all managers?", "output": "SELECT avg(Age) FROM manager", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average age for all managers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5637, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of managers in ascending order of level?", "output": "SELECT Name FROM manager ORDER BY LEVEL ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of managers in ascending order of level?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5638, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and arrival times of trains?", "output": "SELECT Name , Arrival FROM train", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and arrival times of trains?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5639, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the oldest manager?", "output": "SELECT Name FROM manager ORDER BY Age DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the oldest manager?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5640, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of trains and locations of railways they are in.", "output": "SELECT T2.Name , T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of trains and locations of railways they are in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5641, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the builder of railways associated with the trains named \"Andaman Exp\".", "output": "SELECT T1.Builder FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID WHERE T2.Name = \"Andaman Exp\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the builder of railways associated with the trains named \"Andaman Exp\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5642, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show id and location of railways that are associated with more than one train.", "output": "SELECT T2.Railway_ID , T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID GROUP BY T2.Railway_ID HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show id and location of railways that are associated with more than one train.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5643, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the id and builder of the railway that are associated with the most trains.", "output": "SELECT T2.Railway_ID , T1.Builder FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID GROUP BY T2.Railway_ID ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the id and builder of the railway that are associated with the most trains.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5644, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show different builders of railways, along with the corresponding number of railways using each builder.", "output": "SELECT Builder , COUNT(*) FROM railway GROUP BY Builder", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show different builders of railways, along with the corresponding number of railways using each builder.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5645, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the most common builder of railways.", "output": "SELECT Builder FROM railway GROUP BY Builder ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the most common builder of railways.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5646, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show different locations of railways along with the corresponding number of railways at each location.", "output": "SELECT LOCATION , COUNT(*) FROM railway GROUP BY LOCATION", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show different locations of railways along with the corresponding number of railways at each location.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5647, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the locations that have more than one railways.", "output": "SELECT LOCATION FROM railway GROUP BY LOCATION HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the locations that have more than one railways.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5648, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the object number of railways that do not have any trains.", "output": "SELECT ObjectNumber FROM railway WHERE Railway_ID NOT IN (SELECT Railway_ID FROM train)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the object number of railways that do not have any trains.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5649, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the countries that have both managers of age above 50 and managers of age below 46.", "output": "SELECT Country FROM manager WHERE Age > 50 INTERSECT SELECT Country FROM manager WHERE Age < 46", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the countries that have both managers of age above 50 and managers of age below 46.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5650, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the distinct countries of managers.", "output": "SELECT DISTINCT Country FROM manager", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the distinct countries of managers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5651, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the working years of managers in descending order of their level.", "output": "SELECT Working_year_starts FROM manager ORDER BY LEVEL DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the working years of managers in descending order of their level.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "railway", "id": 5652, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the countries that have managers of age above 50 or below 46.", "output": "SELECT Country FROM manager WHERE Age > 50 OR Age < 46", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the countries that have managers of age above 50 or below 46.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_products_contacts", "id": 5653, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many addresses are there in country USA?", "output": "SELECT count(*) FROM addresses WHERE country = 'USA'", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many addresses are there in country USA?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_products_contacts", "id": 5654, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all distinct cities in the address record.", "output": "SELECT DISTINCT city FROM addresses", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Show all distinct cities in the address record.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_products_contacts", "id": 5655, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show each state and the number of addresses in each state.", "output": "SELECT state_province_county , count(*) FROM addresses GROUP BY state_province_county", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Show each state and the number of addresses in each state.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_products_contacts", "id": 5656, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show names and phones of customers who do not have address information.", "output": "SELECT customer_name , customer_phone FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM customer_address_history)", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Show names and phones of customers who do not have address information.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_products_contacts", "id": 5657, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of the customer who has the most orders.", "output": "SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Show the name of the customer who has the most orders.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_products_contacts", "id": 5658, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the product type codes which have at least two products.", "output": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Show the product type codes which have at least two products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_products_contacts", "id": 5659, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of customers who have both an order in completed status and an order in part status.", "output": "SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Completed' INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Part'", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Show the names of customers who have both an order in completed status and an order in part status.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_products_contacts", "id": 5660, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name, phone, and payment method code for all customers in descending order of customer number.", "output": "SELECT customer_name , customer_phone , payment_method_code FROM customers ORDER BY customer_number DESC", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Show the name, phone, and payment method code for all customers in descending order of customer number.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_products_contacts", "id": 5661, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the product name and total order quantity for each product.", "output": "SELECT T1.product_name , sum(T2.order_quantity) FROM products AS T1 JOIN order_items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_id", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Show the product name and total order quantity for each product.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_products_contacts", "id": 5662, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the minimum, maximum, average price for all products.", "output": "SELECT min(product_price) , max(product_price) , avg(product_price) FROM products", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Show the minimum, maximum, average price for all products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_products_contacts", "id": 5663, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many products have a price higher than the average?", "output": "SELECT count(*) FROM products WHERE product_price > (SELECT avg(product_price) FROM products)", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: How many products have a price higher than the average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_products_contacts", "id": 5664, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the customer name, customer address city, date from, and date to for each customer address history.", "output": "SELECT T2.customer_name , T3.city , T1.date_from , T1.date_to FROM customer_address_history AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id JOIN addresses AS T3 ON T1.address_id = T3.address_id", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Show the customer name, customer address city, date from, and date to for each customer address history.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_products_contacts", "id": 5665, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of customers who use Credit Card payment method and have more than 2 orders.", "output": "SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.payment_method_code = 'Credit Card' GROUP BY T1.customer_id HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Show the names of customers who use Credit Card payment method and have more than 2 orders.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_products_contacts", "id": 5666, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and phone of the customer with the most ordered product quantity?", "output": "SELECT T1.customer_name , T1.customer_phone FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T3.order_id = T2.order_id GROUP BY T1.customer_id ORDER BY sum(T3.order_quantity) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: What are the name and phone of the customer with the most ordered product quantity?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_products_contacts", "id": 5667, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the product type and name for the products with price higher than 1000 or lower than 500.", "output": "SELECT product_type_code , product_name FROM products WHERE product_price > 1000 OR product_price < 500", "input": "Based on \n# the table&column(database schema) 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']} and \n# the user question: Show the product type and name for the products with price higher than 1000 or lower than 500.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5668, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of dorms only for female (F gender).", "output": "SELECT dorm_name FROM dorm WHERE gender = 'F'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of dorms only for female (F gender).,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5669, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the all-female dorms?", "output": "SELECT dorm_name FROM dorm WHERE gender = 'F'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the all-female dorms?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5670, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of dorms that can accommodate more than 300 students.", "output": "SELECT dorm_name FROM dorm WHERE student_capacity > 300", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of dorms that can accommodate more than 300 students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5671, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the dorms that can accomdate more than 300 students?", "output": "SELECT dorm_name FROM dorm WHERE student_capacity > 300", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the dorms that can accomdate more than 300 students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5672, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many female students (sex is F) whose age is below 25?", "output": "SELECT count(*) FROM student WHERE sex = 'F' AND age < 25", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many female students (sex is F) whose age is below 25?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5673, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many girl students who are younger than 25?", "output": "SELECT count(*) FROM student WHERE sex = 'F' AND age < 25", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many girl students who are younger than 25?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5674, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name of students who is older than 20.", "output": "SELECT fname FROM student WHERE age > 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first name of students who is older than 20.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5675, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all students who are older than 20?", "output": "SELECT fname FROM student WHERE age > 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of all students who are older than 20?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5676, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name of students living in city PHL whose age is between 20 and 25.", "output": "SELECT fname FROM student WHERE city_code = 'PHL' AND age BETWEEN 20 AND 25", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first name of students living in city PHL whose age is between 20 and 25.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5677, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name of the students who are in age 20 to 25 and living in PHL city?", "output": "SELECT fname FROM student WHERE city_code = 'PHL' AND age BETWEEN 20 AND 25", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name of the students who are in age 20 to 25 and living in PHL city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5678, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many dorms are there?", "output": "SELECT count(*) FROM dorm", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many dorms are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5679, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many dorms are in the database?", "output": "SELECT count(*) FROM dorm", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many dorms are in the database?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5680, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of distinct amenities.", "output": "SELECT count(*) FROM dorm_amenity", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of distinct amenities.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5681, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many diffrent dorm amenities are there?", "output": "SELECT count(*) FROM dorm_amenity", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many diffrent dorm amenities are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5682, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total capacity of all dorms.", "output": "SELECT sum(student_capacity) FROM dorm", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total capacity of all dorms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5683, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total student capacity of all dorms?", "output": "SELECT sum(student_capacity) FROM dorm", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total student capacity of all dorms?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5684, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are there?", "output": "SELECT count(*) FROM student", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5685, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students exist?", "output": "SELECT count(*) FROM student", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students exist?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5686, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average age of all students living in the each city.", "output": "SELECT avg(age) , city_code FROM student GROUP BY city_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average age of all students living in the each city.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5687, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average age for each city and what are those cities?", "output": "SELECT avg(age) , city_code FROM student GROUP BY city_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average age for each city and what are those cities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5688, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average and total capacity of dorms for the students with gender X.", "output": "SELECT avg(student_capacity) , sum(student_capacity) FROM dorm WHERE gender = 'X'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average and total capacity of dorms for the students with gender X.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5689, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average and total capacity for all dorms who are of gender X?", "output": "SELECT avg(student_capacity) , sum(student_capacity) FROM dorm WHERE gender = 'X'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average and total capacity for all dorms who are of gender X?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5690, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of dorms that have some amenity.", "output": "SELECT count(DISTINCT dormid) FROM has_amenity", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of dorms that have some amenity.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5691, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many dorms have amenities?", "output": "SELECT count(DISTINCT dormid) FROM has_amenity", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many dorms have amenities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5692, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of dorms that do not have any amenity", "output": "SELECT dorm_name FROM dorm WHERE dormid NOT IN (SELECT dormid FROM has_amenity)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of dorms that do not have any amenity,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5693, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the dorms that don't have any amenities?", "output": "SELECT dorm_name FROM dorm WHERE dormid NOT IN (SELECT dormid FROM has_amenity)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the dorms that don't have any amenities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5694, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of distinct gender for dorms.", "output": "SELECT count(DISTINCT gender) FROM dorm", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of distinct gender for dorms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5695, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different genders are there in the dorms?", "output": "SELECT count(DISTINCT gender) FROM dorm", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different genders are there in the dorms?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5696, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the capacity and gender type of the dorm whose name has substring \u2018Donor\u2019.", "output": "SELECT student_capacity , gender FROM dorm WHERE dorm_name LIKE '%Donor%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the capacity and gender type of the dorm whose name has substring \u2018Donor\u2019.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5697, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the student capacity and type of gender for the dorm whose name as the phrase Donor in it?", "output": "SELECT student_capacity , gender FROM dorm WHERE dorm_name LIKE '%Donor%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the student capacity and type of gender for the dorm whose name as the phrase Donor in it?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5698, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and gender type of the dorms whose capacity is greater than 300 or less than 100.", "output": "SELECT dorm_name , gender FROM dorm WHERE student_capacity > 300 OR student_capacity < 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and gender type of the dorms whose capacity is greater than 300 or less than 100.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5699, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and types of the dorms that have a capacity greater than 300 or less than 100?", "output": "SELECT dorm_name , gender FROM dorm WHERE student_capacity > 300 OR student_capacity < 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and types of the dorms that have a capacity greater than 300 or less than 100?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5700, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the numbers of different majors and cities.", "output": "SELECT count(DISTINCT major) , count(DISTINCT city_code) FROM student", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the numbers of different majors and cities.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5701, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different majors are there and how many different city codes are there for each student?", "output": "SELECT count(DISTINCT major) , count(DISTINCT city_code) FROM student", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different majors are there and how many different city codes are there for each student?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5702, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of dorms which have both TV Lounge and Study Room as amenities.", "output": "SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of dorms which have both TV Lounge and Study Room as amenities.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5703, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the dorm with both a TV Lounge and Study Room listed as amenities?", "output": "SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the dorm with both a TV Lounge and Study Room listed as amenities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5704, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of dorms which have TV Lounge but no Study Room as amenity.", "output": "SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of dorms which have TV Lounge but no Study Room as amenity.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5705, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of each dorm that has a TV Lounge but no study rooms?", "output": "SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of each dorm that has a TV Lounge but no study rooms?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5706, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT lname FROM student WHERE sex = 'F' AND city_code = 'BAL' UNION SELECT lname FROM student WHERE sex = 'M' AND age < 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5707, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT lname FROM student WHERE sex = 'F' AND city_code = 'BAL' UNION SELECT lname FROM student WHERE sex = 'M' AND age < 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5708, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the dorm with the largest capacity.", "output": "SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the dorm with the largest capacity.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5709, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the dorm with the largest capacity?", "output": "SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the dorm with the largest capacity?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5710, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List in alphabetic order all different amenities.", "output": "SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List in alphabetic order all different amenities.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5711, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different dorm amenity names in alphabetical order?", "output": "SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different dorm amenity names in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5712, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the code of city where most of students are living in.", "output": "SELECT city_code FROM student GROUP BY city_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the code of city where most of students are living in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5713, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the code of the city with the most students?", "output": "SELECT city_code FROM student GROUP BY city_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the code of the city with the most students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5714, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first and last name of students whose age is younger than the average age.", "output": "SELECT fname , lname FROM student WHERE age < (SELECT avg(age) FROM student)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first and last name of students whose age is younger than the average age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5715, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first and last name of all students who are younger than average?", "output": "SELECT fname , lname FROM student WHERE age < (SELECT avg(age) FROM student)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first and last name of all students who are younger than average?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5716, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT fname , lname FROM student WHERE city_code != 'HKG' ORDER BY age", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5717, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of all students who are not living in the city HKG and order the results by age?", "output": "SELECT fname , lname FROM student WHERE city_code != 'HKG' ORDER BY age", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last names of all students who are not living in the city HKG and order the results by age?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5718, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List name of all amenities which Anonymous Donor Hall has, and sort the results in alphabetic order.", "output": "SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid = T1.amenid JOIN dorm AS T3 ON T2.dormid = T3.dormid WHERE T3.dorm_name = 'Anonymous Donor Hall' ORDER BY T1.amenity_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List name of all amenities which Anonymous Donor Hall has, and sort the results in alphabetic order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5719, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the amenities in alphabetical order that Anonymous Donor Hall has?", "output": "SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid = T1.amenid JOIN dorm AS T3 ON T2.dormid = T3.dormid WHERE T3.dorm_name = 'Anonymous Donor Hall' ORDER BY T1.amenity_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the amenities in alphabetical order that Anonymous Donor Hall has?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5720, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of dorms and total capacity for each gender.", "output": "SELECT count(*) , sum(student_capacity) , gender FROM dorm GROUP BY gender", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of dorms and total capacity for each gender.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5721, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many dorms are there and what is the total capacity for each gender?", "output": "SELECT count(*) , sum(student_capacity) , gender FROM dorm GROUP BY gender", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many dorms are there and what is the total capacity for each gender?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5722, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average and oldest age for students with different sex.", "output": "SELECT avg(age) , max(age) , sex FROM student GROUP BY sex", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average and oldest age for students with different sex.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5723, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average and oldest age for each gender of student?", "output": "SELECT avg(age) , max(age) , sex FROM student GROUP BY sex", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average and oldest age for each gender of student?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5724, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of students in each major.", "output": "SELECT count(*) , major FROM student GROUP BY major", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of students in each major.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5725, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are there in each major?", "output": "SELECT count(*) , major FROM student GROUP BY major", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students are there in each major?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5726, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number and average age of students living in each city.", "output": "SELECT count(*) , avg(age) , city_code FROM student GROUP BY city_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number and average age of students living in each city.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5727, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students live in each city and what are their average ages?", "output": "SELECT count(*) , avg(age) , city_code FROM student GROUP BY city_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students live in each city and what are their average ages?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5728, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average age and number of male students (with sex M) from each city.", "output": "SELECT count(*) , avg(age) , city_code FROM student WHERE sex = 'M' GROUP BY city_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average age and number of male students (with sex M) from each city.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5729, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average age and how many male students are there in each city?", "output": "SELECT count(*) , avg(age) , city_code FROM student WHERE sex = 'M' GROUP BY city_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average age and how many male students are there in each city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5730, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of students for the cities where have more than one student.", "output": "SELECT count(*) , city_code FROM student GROUP BY city_code HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of students for the cities where have more than one student.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5731, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are from each city, and which cities have more than one cities?", "output": "SELECT count(*) , city_code FROM student GROUP BY city_code HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students are from each city, and which cities have more than one cities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5732, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first and last name of students who are not in the largest major.", "output": "SELECT fname , lname FROM student WHERE major != (SELECT major FROM student GROUP BY major ORDER BY count(*) DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first and last name of students who are not in the largest major.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5733, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first and last name of the students who are not in the largest major?", "output": "SELECT fname , lname FROM student WHERE major != (SELECT major FROM student GROUP BY major ORDER BY count(*) DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first and last name of the students who are not in the largest major?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5734, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of students whose age is older than the average age for each gender.", "output": "SELECT count(*) , sex FROM student WHERE age > (SELECT avg(age) FROM student) GROUP BY sex", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of students whose age is older than the average age for each gender.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5735, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are older than average for each gender?", "output": "SELECT count(*) , sex FROM student WHERE age > (SELECT avg(age) FROM student) GROUP BY sex", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students are older than average for each gender?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5736, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average age of students living in each dorm and the name of dorm.", "output": "SELECT avg(T1.age) , T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average age of students living in each dorm and the name of dorm.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5737, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average age for each dorm and what are the names of each dorm?", "output": "SELECT avg(T1.age) , T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average age for each dorm and what are the names of each dorm?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5738, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of amenities for each of the dorms that can accommodate more than 100 students.", "output": "SELECT count(*) , T1.dormid FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid WHERE T1.student_capacity > 100 GROUP BY T1.dormid", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of amenities for each of the dorms that can accommodate more than 100 students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5739, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each dorm, how many amenities does it have?", "output": "SELECT count(*) , T1.dormid FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid WHERE T1.student_capacity > 100 GROUP BY T1.dormid", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each dorm, how many amenities does it have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5740, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of students who is older than 20 in each dorm.", "output": "SELECT count(*) , T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.age > 20 GROUP BY T3.dorm_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of students who is older than 20 in each dorm.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5741, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are older than 20 in each dorm?", "output": "SELECT count(*) , T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.age > 20 GROUP BY T3.dorm_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students are older than 20 in each dorm?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5742, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name of students who are living in the Smith Hall.", "output": "SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first name of students who are living in the Smith Hall.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5743, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all students in Smith Hall?", "output": "SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of all students in Smith Hall?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5744, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average age of students who are living in the dorm with the largest capacity.", "output": "SELECT avg(T1.age) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.student_capacity = (SELECT max(student_capacity) FROM dorm)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average age of students who are living in the dorm with the largest capacity.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5745, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average age of students who are living in the dorm with the largest capacity?", "output": "SELECT avg(T1.age) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.student_capacity = (SELECT max(student_capacity) FROM dorm)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average age of students who are living in the dorm with the largest capacity?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5746, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total number of students living in the male dorm (with gender M).", "output": "SELECT count(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.gender = 'M'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total number of students living in the male dorm (with gender M).,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5747, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the total number of students who are living in a male dorm?", "output": "SELECT count(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.gender = 'M'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the total number of students who are living in a male dorm?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5748, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of female students (with F sex) living in Smith Hall", "output": "SELECT count(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' AND T1.sex = 'F'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of female students (with F sex) living in Smith Hall,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5749, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many female students live in Smith Hall?", "output": "SELECT count(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' AND T1.sex = 'F'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many female students live in Smith Hall?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5750, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of amenities Smith Hall dorm have.", "output": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of amenities Smith Hall dorm have.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5751, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the amenities that Smith Hall has?", "output": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the amenities that Smith Hall has?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5752, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of amenities Smith Hall dorm have. ordered the results by amenity names.", "output": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall' ORDER BY T3.amenity_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of amenities Smith Hall dorm have. ordered the results by amenity names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5753, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What amenities does Smith Hall have in alphabetical order?", "output": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall' ORDER BY T3.amenity_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What amenities does Smith Hall have in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5754, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of amenity that is most common in all dorms.", "output": "SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T1.amenid = T2.amenid GROUP BY T2.amenid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of amenity that is most common in all dorms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5755, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most common amenity in the dorms?", "output": "SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T1.amenid = T2.amenid GROUP BY T2.amenid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most common amenity in the dorms?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5756, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name of students who are living in the dorm that has most number of amenities.", "output": "SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T2.dormid FROM dorm AS T3 JOIN has_amenity AS T4 ON T3.dormid = T4.dormid JOIN dorm_amenity AS T5 ON T4.amenid = T5.amenid GROUP BY T3.dormid ORDER BY count(*) DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first name of students who are living in the dorm that has most number of amenities.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5757, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of all students who live in the dorm with the most amenities?", "output": "SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T2.dormid FROM dorm AS T3 JOIN has_amenity AS T4 ON T3.dormid = T4.dormid JOIN dorm_amenity AS T5 ON T4.amenid = T5.amenid GROUP BY T3.dormid ORDER BY count(*) DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of all students who live in the dorm with the most amenities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5758, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and capacity of the dorm with least number of amenities.", "output": "SELECT T1.dorm_name , T1.student_capacity FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid GROUP BY T2.dormid ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and capacity of the dorm with least number of amenities.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5759, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and capacity of the dorm with the fewest amount of amenities?", "output": "SELECT T1.dorm_name , T1.student_capacity FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid GROUP BY T2.dormid ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and capacity of the dorm with the fewest amount of amenities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5760, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of dorms that do not have amenity TV Lounge.", "output": "SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of dorms that do not have amenity TV Lounge.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5761, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the dorm that does not have a TV Lounge?", "output": "SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the dorm that does not have a TV Lounge?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5762, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first and last name of students who are living in the dorms that have amenity TV Lounge.", "output": "SELECT T1.fname , T1.lname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first and last name of students who are living in the dorms that have amenity TV Lounge.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5763, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of all students who are living in a dorm with a TV Lounge?", "output": "SELECT T1.fname , T1.lname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last names of all students who are living in a dorm with a TV Lounge?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5764, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name and age of students who are living in the dorms that do not have amenity TV Lounge.", "output": "SELECT T1.fname , T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid NOT IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first name and age of students who are living in the dorms that do not have amenity TV Lounge.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5765, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name and age of every student who lives in a dorm with a TV Lounge?", "output": "SELECT T1.fname , T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid NOT IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name and age of every student who lives in a dorm with a TV Lounge?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5766, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of amenities of the dorm where the student with last name Smith is living in.", "output": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid JOIN lives_in AS T4 ON T4.dormid = T1.dormid JOIN student AS T5 ON T5.stuid = T4.stuid WHERE T5.lname = 'Smith'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of amenities of the dorm where the student with last name Smith is living in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "dorm_1", "id": 5767, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the amenities in the dorm that a student who has the last name of Smith lives in?", "output": "SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid JOIN lives_in AS T4 ON T4.dormid = T1.dormid JOIN student AS T5 ON T5.stuid = T4.stuid WHERE T5.lname = 'Smith'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the amenities in the dorm that a student who has the last name of Smith lives in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5768, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers are there?", "output": "SELECT count(*) FROM customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5769, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of customers.", "output": "SELECT count(*) FROM customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5770, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the emails and phone numbers of all the customers, ordered by email address and phone number.", "output": "SELECT email_address , phone_number FROM customers ORDER BY email_address , phone_number", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the emails and phone numbers of all the customers, ordered by email address and phone number.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5771, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the emails and phone numbers of all customers, sorted by email address and phone number?", "output": "SELECT email_address , phone_number FROM customers ORDER BY email_address , phone_number", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the emails and phone numbers of all customers, sorted by email address and phone number?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5772, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which city has the least number of customers whose type code is \"Good Credit Rating\"?", "output": "SELECT town_city FROM customers WHERE customer_type_code = \"Good Credit Rating\" GROUP BY town_city ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which city has the least number of customers whose type code is \"Good Credit Rating\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5773, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the city with the customer type code \"Good Credit Rating\" that had the fewest customers.", "output": "SELECT town_city FROM customers WHERE customer_type_code = \"Good Credit Rating\" GROUP BY town_city ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the city with the customer type code \"Good Credit Rating\" that had the fewest customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5774, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of all products along with the number of complaints that they have received.", "output": "SELECT t1.product_name , count(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of all products along with the number of complaints that they have received.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5775, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the different product names, and how many complains has each received?", "output": "SELECT t1.product_name , count(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the different product names, and how many complains has each received?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5776, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the emails of customers who has filed a complaints of the product with the most complaints.", "output": "SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the emails of customers who has filed a complaints of the product with the most complaints.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5777, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the emails of customers who have filed complaints on the product which has had the greatest number of complaints?", "output": "SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the emails of customers who have filed complaints on the product which has had the greatest number of complaints?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5778, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which products has been complained by the customer who has filed least amount of complaints?", "output": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id JOIN customers AS t3 GROUP BY t3.customer_id ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which products has been complained by the customer who has filed least amount of complaints?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5779, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names of products that have had complaints filed by the customer who has filed the fewest complaints.", "output": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id JOIN customers AS t3 GROUP BY t3.customer_id ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the names of products that have had complaints filed by the customer who has filed the fewest complaints.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5780, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the phone number of the customer who has filed the most recent complaint?", "output": "SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the phone number of the customer who has filed the most recent complaint?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5781, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the phone number of the customer who filed the complaint that was raised most recently.", "output": "SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the phone number of the customer who filed the complaint that was raised most recently.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5782, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the email and phone number of the customers who have never filed a complaint before.", "output": "SELECT email_address , phone_number FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM complaints)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the email and phone number of the customers who have never filed a complaint before.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5783, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the emails and phone numbers of custoemrs who have never filed a complaint?", "output": "SELECT email_address , phone_number FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM complaints)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the emails and phone numbers of custoemrs who have never filed a complaint?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5784, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the phone number of all the customers and staff.", "output": "SELECT phone_number FROM customers UNION SELECT phone_number FROM staff", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the phone number of all the customers and staff.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5785, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the phone numbers of all customers and all staff members?", "output": "SELECT phone_number FROM customers UNION SELECT phone_number FROM staff", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the phone numbers of all customers and all staff members?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5786, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description of the product named \"Chocolate\"?", "output": "SELECT product_description FROM products WHERE product_name = \"Chocolate\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description of the product named \"Chocolate\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5787, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the description of the product called \"Chocolate\".", "output": "SELECT product_description FROM products WHERE product_name = \"Chocolate\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the description of the product called \"Chocolate\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5788, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and category of the most expensive product.", "output": "SELECT product_name , product_category_code FROM products ORDER BY product_price DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and category of the most expensive product.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5789, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and category code of the product with the highest price?", "output": "SELECT product_name , product_category_code FROM products ORDER BY product_price DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and category code of the product with the highest price?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5790, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the prices of products which has never received a single complaint.", "output": "SELECT product_price FROM products WHERE product_id NOT IN (SELECT product_id FROM complaints)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the prices of products which has never received a single complaint.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5791, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the prices of products that have never gotten a complaint?", "output": "SELECT product_price FROM products WHERE product_id NOT IN (SELECT product_id FROM complaints)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the prices of products that have never gotten a complaint?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5792, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average price of the products for each category?", "output": "SELECT avg(product_price) , product_category_code FROM products GROUP BY product_category_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average price of the products for each category?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5793, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the average price of products that have each category code.", "output": "SELECT avg(product_price) , product_category_code FROM products GROUP BY product_category_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the average price of products that have each category code.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5794, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last name of the staff member who processed the complaint of the cheapest product.", "output": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id JOIN products AS t3 ON t2.product_id = t3.product_id ORDER BY t3.product_price LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the last name of the staff member who processed the complaint of the cheapest product.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5795, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last name of the staff member in charge of the complaint on the product with the lowest price?", "output": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id JOIN products AS t3 ON t2.product_id = t3.product_id ORDER BY t3.product_price LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the last name of the staff member in charge of the complaint on the product with the lowest price?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5796, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which complaint status has more than 3 records on file?", "output": "SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING count(*) > 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which complaint status has more than 3 records on file?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5797, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return complaint status codes have more than 3 corresponding complaints?", "output": "SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING count(*) > 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return complaint status codes have more than 3 corresponding complaints?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5798, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last name of the staff whose email address contains \"wrau\".", "output": "SELECT last_name FROM staff WHERE email_address LIKE \"%wrau%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the last name of the staff whose email address contains \"wrau\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5799, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the last names of staff with email addressed containing the substring \"wrau\"?", "output": "SELECT last_name FROM staff WHERE email_address LIKE \"%wrau%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the last names of staff with email addressed containing the substring \"wrau\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5800, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers are there in the customer type with the most customers?", "output": "SELECT count(*) FROM customers GROUP BY customer_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers are there in the customer type with the most customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5801, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of customers that have the customer type that is most common.", "output": "SELECT count(*) FROM customers GROUP BY customer_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of customers that have the customer type that is most common.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5802, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last name of the staff who has handled the first ever complaint?", "output": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the last name of the staff who has handled the first ever complaint?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5803, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the last name of the staff member who handled the complaint with the earliest date raised.", "output": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the last name of the staff member who handled the complaint with the earliest date raised.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5804, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct complaint type codes are there in the database?", "output": "SELECT count(DISTINCT complaint_type_code) FROM complaints", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct complaint type codes are there in the database?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5805, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different complaint type codes.", "output": "SELECT count(DISTINCT complaint_type_code) FROM complaints", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of different complaint type codes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5806, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the address line 1 and 2 of the customer with email \"vbogisich@example.org\".", "output": "SELECT address_line_1 , address_line_2 FROM customers WHERE email_address = \"vbogisich@example.org\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the address line 1 and 2 of the customer with email \"vbogisich@example.org\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5807, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are lines 1 and 2 of the addressed of the customer with the email \"vbogisich@example.org\"?", "output": "SELECT address_line_1 , address_line_2 FROM customers WHERE email_address = \"vbogisich@example.org\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are lines 1 and 2 of the addressed of the customer with the email \"vbogisich@example.org\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5808, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of complaints with Product Failure type for each complaint status.", "output": "SELECT complaint_status_code , count(*) FROM complaints WHERE complaint_type_code = \"Product Failure\" GROUP BY complaint_status_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of complaints with Product Failure type for each complaint status.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5809, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Of complaints with the type code \"Product Failure\", how many had each different status code?", "output": "SELECT complaint_status_code , count(*) FROM complaints WHERE complaint_type_code = \"Product Failure\" GROUP BY complaint_status_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Of complaints with the type code \"Product Failure\", how many had each different status code?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5810, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is first names of the top 5 staff who have handled the greatest number of complaints?", "output": "SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY count(*) LIMIT 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is first names of the top 5 staff who have handled the greatest number of complaints?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5811, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the first names of the 5 staff members who have handled the most complaints.", "output": "SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY count(*) LIMIT 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the first names of the 5 staff members who have handled the most complaints.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5812, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which state has the most customers?", "output": "SELECT state FROM customers GROUP BY state ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which state has the most customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customer_complaints", "id": 5813, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the state that has the most customers.", "output": "SELECT state FROM customers GROUP BY state ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the state that has the most customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5814, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many submissions are there?", "output": "SELECT count(*) FROM submission", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: How many submissions are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5815, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of submissions.", "output": "SELECT count(*) FROM submission", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Count the number of submissions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5816, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the authors of submissions in ascending order of scores.", "output": "SELECT Author FROM submission ORDER BY Scores ASC", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: List the authors of submissions in ascending order of scores.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5817, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the author for each submission and list them in ascending order of submission score.", "output": "SELECT Author FROM submission ORDER BY Scores ASC", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Find the author for each submission and list them in ascending order of submission score.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5818, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the authors of submissions and their colleges?", "output": "SELECT Author , College FROM submission", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: What are the authors of submissions and their colleges?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5819, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each submission, show the author and their affiliated college.", "output": "SELECT Author , College FROM submission", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: For each submission, show the author and their affiliated college.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5820, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of authors from college \"Florida\" or \"Temple\"", "output": "SELECT Author FROM submission WHERE College = \"Florida\" OR College = \"Temple\"", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Show the names of authors from college \"Florida\" or \"Temple\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5821, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which authors with submissions are from college \"Florida\" or \"Temple\"?", "output": "SELECT Author FROM submission WHERE College = \"Florida\" OR College = \"Temple\"", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Which authors with submissions are from college \"Florida\" or \"Temple\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5822, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average score of submissions?", "output": "SELECT avg(Scores) FROM submission", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: What is the average score of submissions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5823, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Compute the average score of submissions.", "output": "SELECT avg(Scores) FROM submission", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Compute the average score of submissions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5824, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the author of the submission with the highest score?", "output": "SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: What is the author of the submission with the highest score?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5825, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the author who achieved the highest score in a submission.", "output": "SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Find the author who achieved the highest score in a submission.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5826, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show different colleges along with the number of authors of submission from each college.", "output": "SELECT College , COUNT(*) FROM submission GROUP BY College", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Show different colleges along with the number of authors of submission from each college.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5827, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each college, return the college name and the count of authors with submissions from that college.", "output": "SELECT College , COUNT(*) FROM submission GROUP BY College", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: For each college, return the college name and the count of authors with submissions from that college.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5828, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the most common college of authors of submissions.", "output": "SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Show the most common college of authors of submissions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5829, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which college has the most authors with submissions?", "output": "SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Which college has the most authors with submissions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5830, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80.", "output": "SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5831, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which colleges have both authors with submission score above 90 and authors with submission score below 80?", "output": "SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Which colleges have both authors with submission score above 90 and authors with submission score below 80?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5832, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the authors of submissions and the acceptance results of their submissions.", "output": "SELECT T2.Author , T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Show the authors of submissions and the acceptance results of their submissions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5833, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each submission, find its author and acceptance result.", "output": "SELECT T2.Author , T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: For each submission, find its author and acceptance result.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5834, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the result of the submission with the highest score.", "output": "SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Show the result of the submission with the highest score.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5835, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which submission received the highest score in acceptance result. Show me the result.", "output": "SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Which submission received the highest score in acceptance result. Show me the result.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5836, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show each author and the number of workshops they submitted to.", "output": "SELECT T2.Author , COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Show each author and the number of workshops they submitted to.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5837, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many workshops did each author submit to? Return the author name and the number of workshops.", "output": "SELECT T2.Author , COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: How many workshops did each author submit to? Return the author name and the number of workshops.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5838, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the authors who have submissions to more than one workshop.", "output": "SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Show the authors who have submissions to more than one workshop.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5839, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which authors have submitted to more than one workshop?", "output": "SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Which authors have submitted to more than one workshop?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5840, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the date and venue of each workshop in ascending alphabetical order of the venue.", "output": "SELECT Date , Venue FROM workshop ORDER BY Venue", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Show the date and venue of each workshop in ascending alphabetical order of the venue.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5841, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Sort the each workshop in alphabetical order of the venue. Return the date and venue of each workshop.", "output": "SELECT Date , Venue FROM workshop ORDER BY Venue", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Sort the each workshop in alphabetical order of the venue. Return the date and venue of each workshop.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5842, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the authors who do not have submission to any workshop.", "output": "SELECT Author FROM submission WHERE Submission_ID NOT IN (SELECT Submission_ID FROM acceptance)", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: List the authors who do not have submission to any workshop.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "workshop_paper", "id": 5843, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which authors did not submit to any workshop?", "output": "SELECT Author FROM submission WHERE Submission_ID NOT IN (SELECT Submission_ID FROM acceptance)", "input": "Based on \n# the table&column(database schema) information {'workshop': ['Workshop_ID', 'Date', 'Venue', 'Name'], 'submission': ['Submission_ID', 'Scores', 'Author', 'College'], 'Acceptance': ['Submission_ID', 'Workshop_ID', 'Result']} and \n# the user question: Which authors did not submit to any workshop?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5844, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of investors in total.", "output": "SELECT count(*) FROM INVESTORS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of investors in total.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5845, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all investor details.", "output": "SELECT Investor_details FROM INVESTORS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all investor details.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5846, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all distinct lot details.", "output": "SELECT DISTINCT lot_details FROM LOTS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all distinct lot details.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5847, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the maximum amount of transaction.", "output": "SELECT max(amount_of_transaction) FROM TRANSACTIONS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the maximum amount of transaction.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5848, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all date and share count of transactions.", "output": "SELECT date_of_transaction , share_count FROM TRANSACTIONS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all date and share count of transactions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5849, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total share of transactions?", "output": "SELECT sum(share_count) FROM TRANSACTIONS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total share of transactions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5850, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all transaction ids with transaction code 'PUR'.", "output": "SELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code = 'PUR'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all transaction ids with transaction code 'PUR'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5851, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all dates of transactions whose type code is \"SALE\".", "output": "SELECT date_of_transaction FROM TRANSACTIONS WHERE transaction_type_code = \"SALE\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all dates of transactions whose type code is \"SALE\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5852, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average amount of transactions with type code \"SALE\".", "output": "SELECT avg(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = \"SALE\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the average amount of transactions with type code \"SALE\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5853, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the description of transaction type with code \"PUR\".", "output": "SELECT transaction_type_description FROM Ref_Transaction_Types WHERE transaction_type_code\t = \"PUR\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the description of transaction type with code \"PUR\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5854, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the minimum amount of transactions whose type code is \"PUR\" and whose share count is bigger than 50.", "output": "SELECT min(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = \"PUR\" AND share_count > 50", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the minimum amount of transactions whose type code is \"PUR\" and whose share count is bigger than 50.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5855, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the maximum share count of transactions where the amount is smaller than 10000", "output": "SELECT max(share_count) FROM TRANSACTIONS WHERE amount_of_transaction < 10000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the maximum share count of transactions where the amount is smaller than 10000,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5856, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000.", "output": "SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 1000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5857, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the transaction type descriptions and dates if the share count is smaller than 10.", "output": "SELECT T1.transaction_type_description , T2.date_of_transaction FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the transaction type descriptions and dates if the share count is smaller than 10.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5858, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show details of all investors if they make any transaction with share count greater than 100.", "output": "SELECT T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.share_count > 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show details of all investors if they make any transaction with share count greater than 100.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5859, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct transaction types are used in the transactions?", "output": "SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct transaction types are used in the transactions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5860, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the lot details and investor ids.", "output": "SELECT lot_details , investor_id FROM LOTS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the lot details and investor ids.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5861, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the lot details of lots that belong to investors with details \"l\"?", "output": "SELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = \"l\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the lot details of lots that belong to investors with details \"l\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5862, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the purchase details of transactions with amount bigger than 10000?", "output": "SELECT T1.purchase_details FROM PURCHASES AS T1 JOIN TRANSACTIONS AS T2 ON T1.purchase_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction > 10000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the purchase details of transactions with amount bigger than 10000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5863, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the sale details and dates of transactions with amount smaller than 3000?", "output": "SELECT T1.sales_details , T2.date_of_transaction FROM SALES AS T1 JOIN TRANSACTIONS AS T2 ON T1.sales_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction < 3000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the sale details and dates of transactions with amount smaller than 3000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5864, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the lot details of lots associated with transactions with share count smaller than 50?", "output": "SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count < 50", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the lot details of lots associated with transactions with share count smaller than 50?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5865, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is \"PUR\"?", "output": "SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = \"PUR\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is \"PUR\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5866, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average transaction amount for different transaction types.", "output": "SELECT transaction_type_code , avg(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the average transaction amount for different transaction types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5867, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the maximum and minimum share count of different transaction types.", "output": "SELECT transaction_type_code , max(share_count) , min(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the maximum and minimum share count of different transaction types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5868, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average share count of transactions for different investors.", "output": "SELECT investor_id , avg(share_count) FROM TRANSACTIONS GROUP BY investor_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the average share count of transactions for different investors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5869, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average share count of transactions each each investor, ordered by average share count.", "output": "SELECT investor_id , avg(share_count) FROM TRANSACTIONS GROUP BY investor_id ORDER BY avg(share_count)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the average share count of transactions each each investor, ordered by average share count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5870, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average amount of transactions for different investors.", "output": "SELECT investor_id , avg(amount_of_transaction) FROM TRANSACTIONS GROUP BY investor_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the average amount of transactions for different investors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5871, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average amount of transactions for different lots.", "output": "SELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the average amount of transactions for different lots.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5872, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average amount of transactions for different lots, ordered by average amount of transactions.", "output": "SELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY avg(amount_of_transaction)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the average amount of transactions for different lots, ordered by average amount of transactions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5873, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of transactions with transaction type code \"SALE\" for different investors if it is larger than 0.", "output": "SELECT investor_id , COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = \"SALE\" GROUP BY investor_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of transactions with transaction type code \"SALE\" for different investors if it is larger than 0.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5874, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of transactions for different investors.", "output": "SELECT investor_id , COUNT(*) FROM TRANSACTIONS GROUP BY investor_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of transactions for different investors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5875, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the transaction type code that occurs the fewest times.", "output": "SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the transaction type code that occurs the fewest times.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5876, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the transaction type code that occurs the most frequently.", "output": "SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the transaction type code that occurs the most frequently.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5877, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the description of the transaction type that occurs most frequently.", "output": "SELECT T1.transaction_type_description FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code GROUP BY T1.transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the description of the transaction type that occurs most frequently.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5878, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the id and details of the investor that has the largest number of transactions.", "output": "SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the id and details of the investor that has the largest number of transactions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5879, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the id and details for the investors who have the top 3 number of transactions.", "output": "SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the id and details for the investors who have the top 3 number of transactions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5880, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ids of the investors who have at least two transactions.", "output": "SELECT T2.investor_id FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the ids of the investors who have at least two transactions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5881, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ids and details of the investors who have at least two transactions with type code \"SALE\".", "output": "SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = \"SALE\" GROUP BY T2.investor_id HAVING COUNT(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the ids and details of the investors who have at least two transactions with type code \"SALE\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5882, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the dates of transactions with at least 100 share count or amount bigger than 100?", "output": "SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count >= 100 OR amount_of_transaction >= 100", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the dates of transactions with at least 100 share count or amount bigger than 100?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5883, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details of all sales and purchases?", "output": "SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details of all sales and purchases?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_share_transactions", "id": 5884, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details of the lots which are not used in any transactions?", "output": "SELECT lot_details FROM Lots EXCEPT SELECT T1.lot_details FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id = T2.lot_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details of the lots which are not used in any transactions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5885, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many available hotels are there in total?", "output": "SELECT count(*) FROM HOTELS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many available hotels are there in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5886, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total number of available hotels.", "output": "SELECT count(*) FROM HOTELS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total number of available hotels.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5887, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the price ranges of hotels?", "output": "SELECT price_range FROM HOTELS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the price ranges of hotels?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5888, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Tell me the price ranges for all the hotels.", "output": "SELECT price_range FROM HOTELS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Tell me the price ranges for all the hotels.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5889, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all distinct location names.", "output": "SELECT DISTINCT Location_Name FROM LOCATIONS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all distinct location names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5890, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct location names?", "output": "SELECT DISTINCT Location_Name FROM LOCATIONS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct location names?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5891, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names and details of all the staff members.", "output": "SELECT Name , Other_Details FROM Staff", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names and details of all the staff members.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5892, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and detail of each staff member?", "output": "SELECT Name , Other_Details FROM Staff", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and detail of each staff member?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5893, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show details of all visitors.", "output": "SELECT Tourist_Details FROM VISITORS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show details of all visitors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5894, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the detail of each visitor?", "output": "SELECT Tourist_Details FROM VISITORS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the detail of each visitor?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5895, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the price ranges of hotels with 5 star ratings.", "output": "SELECT price_range FROM HOTELS WHERE star_rating_code = \"5\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the price ranges of hotels with 5 star ratings.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5896, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the price ranges of five star hotels?", "output": "SELECT price_range FROM HOTELS WHERE star_rating_code = \"5\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the price ranges of five star hotels?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5897, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average price range of hotels that have 5 star ratings and allow pets.", "output": "SELECT avg(price_range) FROM HOTELS WHERE star_rating_code = \"5\" AND pets_allowed_yn = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the average price range of hotels that have 5 star ratings and allow pets.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5898, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average price range of five star hotels that allow pets?", "output": "SELECT avg(price_range) FROM HOTELS WHERE star_rating_code = \"5\" AND pets_allowed_yn = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average price range of five star hotels that allow pets?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5899, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the address of the location \"UK Gallery\"?", "output": "SELECT Address FROM LOCATIONS WHERE Location_Name = \"UK Gallery\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the address of the location \"UK Gallery\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5900, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the address of the location named \"UK Gallery\".", "output": "SELECT Address FROM LOCATIONS WHERE Location_Name = \"UK Gallery\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the address of the location named \"UK Gallery\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5901, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the detail of the location UK Gallery?", "output": "SELECT Other_Details FROM LOCATIONS WHERE Location_Name = \"UK Gallery\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the detail of the location UK Gallery?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5902, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the detail of the location named \"UK Gallery\".", "output": "SELECT Other_Details FROM LOCATIONS WHERE Location_Name = \"UK Gallery\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the detail of the location named \"UK Gallery\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5903, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which location names contain the word \"film\"?", "output": "SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE \"%film%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which location names contain the word \"film\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5904, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the locations whose names contain the word \"film\".", "output": "SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE \"%film%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the locations whose names contain the word \"film\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5905, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct names are associated with all the photos?", "output": "SELECT count(DISTINCT Name) FROM PHOTOS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct names are associated with all the photos?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5906, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of distinct names associated with the photos.", "output": "SELECT count(DISTINCT Name) FROM PHOTOS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of distinct names associated with the photos.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5907, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct visit dates?", "output": "SELECT DISTINCT Visit_Date FROM VISITS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct visit dates?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5908, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the distinct visit dates.", "output": "SELECT DISTINCT Visit_Date FROM VISITS", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the distinct visit dates.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5909, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the tourist attractions that can be accessed by bus?", "output": "SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = \"bus\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the tourist attractions that can be accessed by bus?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5910, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which tourist attractions can we get to by bus? Tell me the names of the attractions.", "output": "SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = \"bus\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which tourist attractions can we get to by bus? Tell me the names of the attractions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5911, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and opening hours of the tourist attractions that can be accessed by bus or walk?", "output": "SELECT Name , Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = \"bus\" OR How_to_Get_There = \"walk\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and opening hours of the tourist attractions that can be accessed by bus or walk?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5912, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names and opening hours of the tourist attractions that we get to by bus or walk.", "output": "SELECT Name , Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = \"bus\" OR How_to_Get_There = \"walk\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names and opening hours of the tourist attractions that we get to by bus or walk.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5913, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the star rating descriptions of the hotels with price above 10000?", "output": "SELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code = T2.star_rating_code WHERE T1.price_range > 10000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the star rating descriptions of the hotels with price above 10000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5914, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the star rating descriptions of the hotels that cost more than 10000.", "output": "SELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code = T2.star_rating_code WHERE T1.price_range > 10000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the star rating descriptions of the hotels that cost more than 10000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5915, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details and opening hours of the museums?", "output": "SELECT T1.Museum_Details , T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details and opening hours of the museums?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5916, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the detail and opening hour for each museum.", "output": "SELECT T1.Museum_Details , T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the detail and opening hour for each museum.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5917, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the tourist attraction that is associated with the photo \"game1\"?", "output": "SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = \"game1\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the tourist attraction that is associated with the photo \"game1\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5918, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which tourist attraction is associated with the photo \"game1\"? Return its name.", "output": "SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = \"game1\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which tourist attraction is associated with the photo \"game1\"? Return its name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5919, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and descriptions of the photos taken at the tourist attraction \"film festival\"?", "output": "SELECT T1.Name , T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = \"film festival\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and descriptions of the photos taken at the tourist attraction \"film festival\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5920, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names and descriptions of the photos taken at the tourist attraction called \"film festival\".", "output": "SELECT T1.Name , T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = \"film festival\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names and descriptions of the photos taken at the tourist attraction called \"film festival\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5921, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details and ways to get to tourist attractions related to royal family?", "output": "SELECT T1.Royal_Family_Details , T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID = T2.Tourist_Attraction_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details and ways to get to tourist attractions related to royal family?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5922, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which tourist attractions are related to royal family? Tell me their details and how we can get there.", "output": "SELECT T1.Royal_Family_Details , T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID = T2.Tourist_Attraction_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which tourist attractions are related to royal family? Tell me their details and how we can get there.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5923, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details of the shops that can be accessed by walk?", "output": "SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = \"walk\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details of the shops that can be accessed by walk?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5924, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the details of the shops that can be reached by walk.", "output": "SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = \"walk\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the details of the shops that can be reached by walk.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5925, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the staff that is in charge of the attraction named \"US museum\"?", "output": "SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = \"US museum\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the staff that is in charge of the attraction named \"US museum\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5926, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Tell me the name of the staff in charge of the attraction called \"US museum\".", "output": "SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = \"US museum\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Tell me the name of the staff in charge of the attraction called \"US museum\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5927, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details of the markets that can be accessed by walk or bus?", "output": "SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = \"walk\" OR T2.How_to_Get_There = \"bus\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details of the markets that can be accessed by walk or bus?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5928, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the details of all the markets that are accessible by walk or bus.", "output": "SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = \"walk\" OR T2.How_to_Get_There = \"bus\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the details of all the markets that are accessible by walk or bus.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5929, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the visit date and details of the visitor whose detail is 'Vincent'?", "output": "SELECT T2.Visit_Date , T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = \"Vincent\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the visit date and details of the visitor whose detail is 'Vincent'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5930, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the visit date and details of the tourist whose detail is 'Vincent'", "output": "SELECT T2.Visit_Date , T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = \"Vincent\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the visit date and details of the tourist whose detail is 'Vincent',\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5931, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which tourist attractions does the visitor with detail 'Vincent' visit?", "output": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = \"Vincent\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which tourist attractions does the visitor with detail 'Vincent' visit?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5932, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the tourist attractions visited by the tourist whose detail is 'Vincent'.", "output": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = \"Vincent\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the tourist attractions visited by the tourist whose detail is 'Vincent'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5933, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there?", "output": "SELECT T1.Name , T3.Visit_Date FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Vincent\" OR T2.Tourist_Details = \"Vivian\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5934, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each tourist attraction, return its name and the date when the tourists named Vincent or Vivian visited there.", "output": "SELECT T1.Name , T3.Visit_Date FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Vincent\" OR T2.Tourist_Details = \"Vivian\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each tourist attraction, return its name and the date when the tourists named Vincent or Vivian visited there.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5935, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average price of hotels for each star rating code.", "output": "SELECT star_rating_code , avg(price_range) FROM HOTELS GROUP BY star_rating_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the average price of hotels for each star rating code.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5936, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average price range of hotels for each each star rating code?", "output": "SELECT star_rating_code , avg(price_range) FROM HOTELS GROUP BY star_rating_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average price range of hotels for each each star rating code?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5937, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average price of hotels for different pet policy.", "output": "SELECT pets_allowed_yn , avg(price_range) FROM HOTELS GROUP BY pets_allowed_yn", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the average price of hotels for different pet policy.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5938, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average prices of hotels grouped by their pet policy.", "output": "SELECT pets_allowed_yn , avg(price_range) FROM HOTELS GROUP BY pets_allowed_yn", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the average prices of hotels grouped by their pet policy.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5939, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the id and star rating of each hotel, ordered by its price from low to high.", "output": "SELECT hotel_id , star_rating_code FROM HOTELS ORDER BY price_range ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the id and star rating of each hotel, ordered by its price from low to high.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5940, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id and star rating of each hotel and sort them in increasing order of price.", "output": "SELECT hotel_id , star_rating_code FROM HOTELS ORDER BY price_range ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id and star rating of each hotel and sort them in increasing order of price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5941, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the details of the top 3 most expensive hotels.", "output": "SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the details of the top 3 most expensive hotels.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5942, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details of the three most expensive hotels?", "output": "SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details of the three most expensive hotels?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5943, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the details and star ratings of the 3 least expensive hotels.", "output": "SELECT other_hotel_details , star_rating_code FROM HOTELS ORDER BY price_range ASC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the details and star ratings of the 3 least expensive hotels.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5944, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details and star ratings of the three hotels with the lowest price ranges?", "output": "SELECT other_hotel_details , star_rating_code FROM HOTELS ORDER BY price_range ASC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details and star ratings of the three hotels with the lowest price ranges?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5945, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the transportation method most people choose to get to tourist attractions.", "output": "SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the transportation method most people choose to get to tourist attractions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5946, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which transportation method is used the most often to get to tourist attractions?", "output": "SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which transportation method is used the most often to get to tourist attractions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5947, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the description and code of the attraction type most tourist attractions belong to.", "output": "SELECT T1.Attraction_Type_Description , T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the description and code of the attraction type most tourist attractions belong to.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5948, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which attraction type does the most tourist attractions belong to? Tell me its attraction type description and code.", "output": "SELECT T1.Attraction_Type_Description , T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which attraction type does the most tourist attractions belong to? Tell me its attraction type description and code.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5949, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way.", "output": "SELECT How_to_Get_There , COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5950, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the possible ways to get to attractions, together with the number of attractions accessible by these methods.", "output": "SELECT How_to_Get_There , COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the possible ways to get to attractions, together with the number of attractions accessible by these methods.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5951, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show different tourist attractions' names, ids, and the corresponding number of visits.", "output": "SELECT T1.Name , T2.Tourist_Attraction_ID , COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show different tourist attractions' names, ids, and the corresponding number of visits.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5952, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name, id and the corresponding number of visits for each tourist attraction?", "output": "SELECT T1.Name , T2.Tourist_Attraction_ID , COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name, id and the corresponding number of visits for each tourist attraction?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5953, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names and ids of tourist attractions that are visited at least two times.", "output": "SELECT T1.Name , T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names and ids of tourist attractions that are visited at least two times.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5954, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which tourist attractions are visited at least twice? Give me their names and ids.", "output": "SELECT T1.Name , T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which tourist attractions are visited at least twice? Give me their names and ids.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5955, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names and ids of tourist attractions that are visited at most once.", "output": "SELECT T1.Name , T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*) <= 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names and ids of tourist attractions that are visited at most once.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5956, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and ids of the tourist attractions that are visited at most once?", "output": "SELECT T1.Name , T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*) <= 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and ids of the tourist attractions that are visited at most once?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5957, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent?", "output": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = \"660 Shea Crescent\" OR T2.How_to_Get_There = \"walk\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5958, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent.", "output": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = \"660 Shea Crescent\" OR T2.How_to_Get_There = \"walk\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5959, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the tourist attractions that have parking or shopping as their feature details?", "output": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'shopping'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the tourist attractions that have parking or shopping as their feature details?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5960, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the tourist attractions that have parking or shopping as their feature details. What are the names of the attractions?", "output": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID = T3.Feature_ID WHERE T3.feature_Details = 'shopping'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the tourist attractions that have parking or shopping as their feature details. What are the names of the attractions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5961, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction?", "output": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = \"254 Ottilie Junction\" OR T2.How_to_Get_There = \"bus\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5962, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the tourist attractions that is either accessible by bus or at address 254 Ottilie Junction.", "output": "SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = \"254 Ottilie Junction\" OR T2.How_to_Get_There = \"bus\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the tourist attractions that is either accessible by bus or at address 254 Ottilie Junction.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5963, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the tourist attractions Vincent and Marcelle visit?", "output": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Vincent\" INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Marcelle\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the tourist attractions Vincent and Marcelle visit?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5964, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which tourist attractions do the tourists Vincent and Marcelle visit? Tell me the names of the attractions.", "output": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Vincent\" INTERSECT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Marcelle\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which tourist attractions do the tourists Vincent and Marcelle visit? Tell me the names of the attractions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5965, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of tourist attraction that Alison visited but Rosalind did not visit?", "output": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Alison\" EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Rosalind\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of tourist attraction that Alison visited but Rosalind did not visit?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5966, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the the names of the tourist attractions that the tourist named Alison visited but Rosalind did not visit.", "output": "SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Alison\" EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = \"Rosalind\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the the names of the tourist attractions that the tourist named Alison visited but Rosalind did not visit.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5967, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many tourists did not make any visit?", "output": "SELECT count(*) FROM Visitors WHERE Tourist_ID NOT IN ( SELECT Tourist_ID FROM Visits )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many tourists did not make any visit?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Theme_park", "id": 5968, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of tourists who did not visit any place.", "output": "SELECT count(*) FROM Visitors WHERE Tourist_ID NOT IN ( SELECT Tourist_ID FROM Visits )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of tourists who did not visit any place.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5969, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many video games exist?", "output": "SELECT count(*) FROM Video_games", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many video games exist?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5970, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many video games do you have?", "output": "SELECT count(*) FROM Video_games", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many video games do you have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5971, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many video game types exist?", "output": "SELECT count(DISTINCT gtype) FROM Video_games", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many video game types exist?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5972, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the count of different game types?", "output": "SELECT count(DISTINCT gtype) FROM Video_games", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the count of different game types?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5973, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all video game types.", "output": "SELECT DISTINCT gtype FROM Video_games", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all video game types.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5974, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different types of video games?", "output": "SELECT DISTINCT gtype FROM Video_games", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different types of video games?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5975, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all video games and their types in the order of their names.", "output": "SELECT gname , gtype FROM Video_games ORDER BY gname", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all video games and their types in the order of their names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5976, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the video games and their types in alphabetical order?", "output": "SELECT gname , gtype FROM Video_games ORDER BY gname", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the video games and their types in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5977, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all video games with type Collectible card game.", "output": "SELECT gname FROM Video_games WHERE gtype = \"Collectible card game\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all video games with type Collectible card game.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5978, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all video games that are collectible cards?", "output": "SELECT gname FROM Video_games WHERE gtype = \"Collectible card game\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all video games that are collectible cards?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5979, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the type of video game Call of Destiny.", "output": "SELECT gtype FROM Video_games WHERE gname = \"Call of Destiny\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the type of video game Call of Destiny.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5980, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What type of game is Call of Destiny?", "output": "SELECT gtype FROM Video_games WHERE gname = \"Call of Destiny\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What type of game is Call of Destiny?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5981, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many video games have type Massively multiplayer online game?", "output": "SELECT count(*) FROM Video_games WHERE gtype = \"Massively multiplayer online game\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many video games have type Massively multiplayer online game?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5982, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of video games with Massively multiplayer online game type .", "output": "SELECT count(*) FROM Video_games WHERE gtype = \"Massively multiplayer online game\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of video games with Massively multiplayer online game type .,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5983, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all video game types and the number of video games in each type.", "output": "SELECT gtype , count(*) FROM Video_games GROUP BY gtype", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all video game types and the number of video games in each type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5984, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the types of video games and how many are in each type?", "output": "SELECT gtype , count(*) FROM Video_games GROUP BY gtype", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the types of video games and how many are in each type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5985, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which game type has most number of games?", "output": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which game type has most number of games?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5986, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What type has the most games?", "output": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What type has the most games?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5987, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which game type has least number of games?", "output": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which game type has least number of games?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5988, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the type with the fewest games?", "output": "SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the type with the fewest games?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5989, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show ids for all students who live in CHI.", "output": "SELECT StuID FROM Student WHERE city_code = \"CHI\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show ids for all students who live in CHI.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5990, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all students who live in CHI?", "output": "SELECT StuID FROM Student WHERE city_code = \"CHI\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all students who live in CHI?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5991, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show ids for all students who have advisor 1121.", "output": "SELECT StuID FROM Student WHERE Advisor = 1121", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show ids for all students who have advisor 1121.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5992, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all students who have advisor number 1121?", "output": "SELECT StuID FROM Student WHERE Advisor = 1121", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all students who have advisor number 1121?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5993, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show first name for all students with major 600.", "output": "SELECT Fname FROM Student WHERE Major = 600", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show first name for all students with major 600.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5994, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names for all students who are from the major numbered 600?", "output": "SELECT Fname FROM Student WHERE Major = 600", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names for all students who are from the major numbered 600?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5995, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the average, minimum, and maximum age for different majors.", "output": "SELECT major , avg(age) , min(age) , max(age) FROM Student GROUP BY major", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the average, minimum, and maximum age for different majors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5996, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average, minimum, and max ages for each of the different majors?", "output": "SELECT major , avg(age) , min(age) , max(age) FROM Student GROUP BY major", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the average, minimum, and max ages for each of the different majors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5997, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all advisors who have at least two students.", "output": "SELECT advisor FROM Student GROUP BY advisor HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all advisors who have at least two students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5998, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the advisors", "output": "SELECT advisor FROM Student GROUP BY advisor HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the advisors,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 5999, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many sports do we have?", "output": "SELECT count(DISTINCT sportname) FROM Sportsinfo", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many sports do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6000, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different types of sports do we offer?", "output": "SELECT count(DISTINCT sportname) FROM Sportsinfo", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different types of sports do we offer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6001, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students play sports?", "output": "SELECT count(DISTINCT StuID) FROM Sportsinfo", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students play sports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6002, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different students are involved in sports?", "output": "SELECT count(DISTINCT StuID) FROM Sportsinfo", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different students are involved in sports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6003, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List ids for all student who are on scholarship.", "output": "SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List ids for all student who are on scholarship.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6004, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids for all sporty students who are on scholarship?", "output": "SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids for all sporty students who are on scholarship?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6005, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show last names for all student who are on scholarship.", "output": "SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show last names for all student who are on scholarship.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6006, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the last names for all scholarship students?", "output": "SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the last names for all scholarship students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6007, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many games are played for all students?", "output": "SELECT sum(gamesplayed) FROM Sportsinfo", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many games are played for all students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6008, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of games played?", "output": "SELECT sum(gamesplayed) FROM Sportsinfo", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of games played?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6009, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many games are played for all football games by students on scholarship?", "output": "SELECT sum(gamesplayed) FROM Sportsinfo WHERE sportname = \"Football\" AND onscholarship = 'Y'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many games are played for all football games by students on scholarship?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6010, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of all football games played by scholarship students?", "output": "SELECT sum(gamesplayed) FROM Sportsinfo WHERE sportname = \"Football\" AND onscholarship = 'Y'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of all football games played by scholarship students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6011, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all sport name and the number of students.", "output": "SELECT sportname , count(*) FROM Sportsinfo GROUP BY sportname", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all sport name and the number of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6012, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students play each sport?", "output": "SELECT sportname , count(*) FROM Sportsinfo GROUP BY sportname", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students play each sport?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6013, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all student IDs with the number of sports and total number of games played", "output": "SELECT StuID , count(*) , sum(gamesplayed) FROM Sportsinfo GROUP BY StuID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all student IDs with the number of sports and total number of games played,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6014, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all students along with how many sports and games did they play?", "output": "SELECT StuID , count(*) , sum(gamesplayed) FROM Sportsinfo GROUP BY StuID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all students along with how many sports and games did they play?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6015, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all student IDs with more than total 10 hours per week on all sports played.", "output": "SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING sum(hoursperweek) > 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all student IDs with more than total 10 hours per week on all sports played.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6016, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the student IDs for everybody who worked for more than 10 hours per week on all sports?", "output": "SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING sum(hoursperweek) > 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the student IDs for everybody who worked for more than 10 hours per week on all sports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6017, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name and last name of the student who have most number of sports?", "output": "SELECT T2.Fname , T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name and last name of the student who have most number of sports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6018, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first and last name of the student who played the most sports?", "output": "SELECT T2.Fname , T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first and last name of the student who played the most sports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6019, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which sport has most number of students on scholarship?", "output": "SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which sport has most number of students on scholarship?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6020, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the sport with the most scholarship students?", "output": "SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the sport with the most scholarship students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6021, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show student ids who don't have any sports.", "output": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show student ids who don't have any sports.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6022, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all students who don't play sports?", "output": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all students who don't play sports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6023, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show student ids who are on scholarship and have major 600.", "output": "SELECT StuID FROM Student WHERE major = 600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show student ids who are on scholarship and have major 600.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6024, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the student ids for those on scholarship in major number 600?", "output": "SELECT StuID FROM Student WHERE major = 600 INTERSECT SELECT StuID FROM Sportsinfo WHERE onscholarship = 'Y'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the student ids for those on scholarship in major number 600?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6025, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show student ids who are female and play football.", "output": "SELECT StuID FROM Student WHERE sex = 'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname = \"Football\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show student ids who are female and play football.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6026, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all female students who play football?", "output": "SELECT StuID FROM Student WHERE sex = 'F' INTERSECT SELECT StuID FROM Sportsinfo WHERE sportname = \"Football\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all female students who play football?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6027, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all male student ids who don't play football.", "output": "SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = \"Football\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all male student ids who don't play football.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6028, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all male students who do not play football?", "output": "SELECT StuID FROM Student WHERE sex = 'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname = \"Football\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all male students who do not play football?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6029, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show total hours per week and number of games played for student David Shieber.", "output": "SELECT sum(hoursperweek) , sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.Fname = \"David\" AND T2.Lname = \"Shieber\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show total hours per week and number of games played for student David Shieber.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6030, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of hours per work and number of games played by David Shieber?", "output": "SELECT sum(hoursperweek) , sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.Fname = \"David\" AND T2.Lname = \"Shieber\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of hours per work and number of games played by David Shieber?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6031, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show total hours per week and number of games played for students under 20.", "output": "SELECT sum(hoursperweek) , sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show total hours per week and number of games played for students under 20.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6032, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of hours per week and number of games played by students under 20?", "output": "SELECT sum(hoursperweek) , sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.age < 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of hours per week and number of games played by students under 20?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6033, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students play video games?", "output": "SELECT count(DISTINCT StuID) FROM Plays_games", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students play video games?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6034, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different students play games?", "output": "SELECT count(DISTINCT StuID) FROM Plays_games", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different students play games?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6035, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show ids of students who don't play video game.", "output": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show ids of students who don't play video game.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6036, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all students who are not video game players?", "output": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all students who are not video game players?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6037, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show ids of students who play video game and play sports.", "output": "SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show ids of students who play video game and play sports.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6038, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all students who played video games and sports?", "output": "SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all students who played video games and sports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6039, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all game ids and the number of hours played.", "output": "SELECT gameid , sum(hours_played) FROM Plays_games GROUP BY gameid", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all game ids and the number of hours played.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6040, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are ids and total number of hours played for each game?", "output": "SELECT gameid , sum(hours_played) FROM Plays_games GROUP BY gameid", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are ids and total number of hours played for each game?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6041, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all student ids and the number of hours played.", "output": "SELECT Stuid , sum(hours_played) FROM Plays_games GROUP BY Stuid", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all student ids and the number of hours played.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6042, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all students and number of hours played?", "output": "SELECT Stuid , sum(hours_played) FROM Plays_games GROUP BY Stuid", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all students and number of hours played?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6043, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the game name that has most number of hours played.", "output": "SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid ORDER BY sum(hours_played) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the game name that has most number of hours played.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6044, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the game that has been played the most?", "output": "SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid ORDER BY sum(hours_played) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the game that has been played the most?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6045, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all game names played by at least 1000 hours.", "output": "SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid HAVING sum(hours_played) >= 1000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all game names played by at least 1000 hours.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6046, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the games that have been played for at least 1000 hours?", "output": "SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid HAVING sum(hours_played) >= 1000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the games that have been played for at least 1000 hours?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6047, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all game names played by Linda Smith", "output": "SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = \"Smith\" AND T3.Fname = \"Linda\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all game names played by Linda Smith,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6048, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all games played by Linda Smith?", "output": "SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = \"Smith\" AND T3.Fname = \"Linda\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all games played by Linda Smith?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6049, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last and first name of students who are playing Football or Lacrosse.", "output": "SELECT T2.lname , T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = \"Football\" OR T1.SportName = \"Lacrosse\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the last and first name of students who are playing Football or Lacrosse.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6050, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first and last name of all students who play Football or Lacrosse?", "output": "SELECT T2.lname , T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = \"Football\" OR T1.SportName = \"Lacrosse\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first and last name of all students who play Football or Lacrosse?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6051, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first name and age of the students who are playing both Football and Lacrosse.", "output": "SELECT fname , age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = \"Football\" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = \"Lacrosse\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first name and age of the students who are playing both Football and Lacrosse.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6052, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names and ages of all students who are playing both Football and Lacrosse?", "output": "SELECT fname , age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = \"Football\" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = \"Lacrosse\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names and ages of all students who are playing both Football and Lacrosse?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6053, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games.", "output": "SELECT lname , sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = \"Call of Destiny\" INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = \"Works of Widenius\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "game_1", "id": 6054, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what is the last name and gender of all students who played both Call of Destiny and Works of Widenius?", "output": "SELECT lname , sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = \"Call of Destiny\" INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID = T2.GameID WHERE T2.Gname = \"Works of Widenius\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what is the last name and gender of all students who played both Call of Destiny and Works of Widenius?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6055, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of all customers.", "output": "SELECT customer_name FROM customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of all customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6056, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the customers?", "output": "SELECT customer_name FROM customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all the customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6057, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers are there?", "output": "SELECT count(*) FROM customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6058, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the total number of distinct customers.", "output": "SELECT count(*) FROM customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the total number of distinct customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6059, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average amount of items ordered in each order?", "output": "SELECT avg(order_quantity) FROM order_items", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average amount of items ordered in each order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6060, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average order quantity per order.", "output": "SELECT avg(order_quantity) FROM order_items", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average order quantity per order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6061, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of customers who use payment method \"Cash\"?", "output": "SELECT customer_name FROM customers WHERE payment_method = \"Cash\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of customers who use payment method \"Cash\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6062, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customers use \"Cash\" for payment method? Return the customer names.", "output": "SELECT customer_name FROM customers WHERE payment_method = \"Cash\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customers use \"Cash\" for payment method? Return the customer names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6063, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the \"date became customers\" of the customers whose ID is between 10 and 20.", "output": "SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the \"date became customers\" of the customers whose ID is between 10 and 20.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6064, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the dates when customers with ids between 10 and 20 became customers?", "output": "SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the dates when customers with ids between 10 and 20 became customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6065, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which payment method is used by most customers?", "output": "SELECT payment_method FROM customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which payment method is used by most customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6066, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the payment method that is used most frequently.", "output": "SELECT payment_method FROM customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the payment method that is used most frequently.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6067, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of customers using the most popular payment method?", "output": "SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of customers using the most popular payment method?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6068, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the customers who use the most frequently used payment method.", "output": "SELECT customer_name FROM customers WHERE payment_method = (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the customers who use the most frequently used payment method.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6069, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the payment methods?", "output": "SELECT DISTINCT payment_method FROM customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the payment methods?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6070, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return all the distinct payment methods used by customers.", "output": "SELECT DISTINCT payment_method FROM customers", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return all the distinct payment methods used by customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6071, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details of all products?", "output": "SELECT DISTINCT product_details FROM products", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details of all products?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6072, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the the details of all products.", "output": "SELECT DISTINCT product_details FROM products", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the the details of all products.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6073, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of all customers whose name contains \"Alex\".", "output": "SELECT customer_name FROM customers WHERE customer_name LIKE \"%Alex%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of all customers whose name contains \"Alex\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6074, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customer's name contains \"Alex\"? Find the full name.", "output": "SELECT customer_name FROM customers WHERE customer_name LIKE \"%Alex%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customer's name contains \"Alex\"? Find the full name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6075, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the detail of products whose detail contains the word \"Latte\" or the word \"Americano\"", "output": "SELECT product_details FROM products WHERE product_details LIKE \"%Latte%\" OR product_details LIKE \"%Americano%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the detail of products whose detail contains the word \"Latte\" or the word \"Americano\",\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6076, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which product's detail contains the word \"Latte\" or \"Americano\"? Return the full detail.", "output": "SELECT product_details FROM products WHERE product_details LIKE \"%Latte%\" OR product_details LIKE \"%Americano%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which product's detail contains the word \"Latte\" or \"Americano\"? Return the full detail.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6077, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the address content of the customer named \"Maudie Kertzmann\"?", "output": "SELECT t3.address_content FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t1.customer_name = \"Maudie Kertzmann\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the address content of the customer named \"Maudie Kertzmann\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6078, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the address content for the customer whose name is \"Maudie Kertzmann\".", "output": "SELECT t3.address_content FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t1.customer_name = \"Maudie Kertzmann\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the address content for the customer whose name is \"Maudie Kertzmann\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6079, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers are living in city \"Lake Geovannyton\"?", "output": "SELECT count(*) FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.city = \"Lake Geovannyton\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers are living in city \"Lake Geovannyton\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6080, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of customers who live in the city called Lake Geovannyton.", "output": "SELECT count(*) FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.city = \"Lake Geovannyton\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of customers who live in the city called Lake Geovannyton.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6081, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of customers who are living in Colorado?", "output": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = \"Colorado\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of customers who are living in Colorado?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6082, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of customers who live in Colorado state?", "output": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = \"Colorado\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of customers who live in Colorado state?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6083, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the list of cities that no customer is living in.", "output": "SELECT city FROM addresses WHERE city NOT IN ( SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the list of cities that no customer is living in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6084, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the cities no customers live in?", "output": "SELECT city FROM addresses WHERE city NOT IN ( SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the cities no customers live in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6085, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which city has the most customers living in?", "output": "SELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which city has the most customers living in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6086, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the city where the most customers live.", "output": "SELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id GROUP BY t3.city ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the city where the most customers live.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6087, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Retrieve the list of all cities.", "output": "SELECT DISTINCT city FROM addresses", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Retrieve the list of all cities.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6088, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the distinct cities", "output": "SELECT DISTINCT city FROM addresses", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the distinct cities,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6089, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the city with post code 255.", "output": "SELECT city FROM addresses WHERE zip_postcode = 255", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the city with post code 255.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6090, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which city is post code 255 located in?", "output": "SELECT city FROM addresses WHERE zip_postcode = 255", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which city is post code 255 located in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6091, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the state and country of all cities with post code starting with 4.", "output": "SELECT state_province_county , country FROM addresses WHERE zip_postcode LIKE \"4%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the state and country of all cities with post code starting with 4.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6092, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the state and country of all the cities that have post codes starting with 4.\\", "output": "SELECT state_province_county , country FROM addresses WHERE zip_postcode LIKE \"4%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the state and country of all the cities that have post codes starting with 4.\\,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6093, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the countries having more than 4 addresses listed.", "output": "SELECT country FROM addresses GROUP BY country HAVING count(address_id) > 4", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the countries having more than 4 addresses listed.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6094, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For which countries are there more than four distinct addresses listed?", "output": "SELECT country FROM addresses GROUP BY country HAVING count(address_id) > 4", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For which countries are there more than four distinct addresses listed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6095, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the contact channel codes that were used less than 5 times.", "output": "SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING count(customer_id) < 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the contact channel codes that were used less than 5 times.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6096, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which contact channel codes were used less than 5 times?", "output": "SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING count(customer_id) < 5", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which contact channel codes were used less than 5 times?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6097, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which contact channel has been used by the customer with name \"Tillman Ernser\"?", "output": "SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Tillman Ernser\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which contact channel has been used by the customer with name \"Tillman Ernser\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6098, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the contact channel code that was used by the customer named \"Tillman Ernser\".", "output": "SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Tillman Ernser\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the contact channel code that was used by the customer named \"Tillman Ernser\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6099, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the \"active to date\" of the latest contact channel used by \"Tillman Ernser\"?", "output": "SELECT max(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Tillman Ernser\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the \"active to date\" of the latest contact channel used by \"Tillman Ernser\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6100, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the the \"active to date\" of the latest contact channel used by the customer named \"Tillman Ernser\".", "output": "SELECT max(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = \"Tillman Ernser\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the the \"active to date\" of the latest contact channel used by the customer named \"Tillman Ernser\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6101, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average time span of contact channels in the database?", "output": "SELECT avg(active_to_date - active_from_date) FROM customer_contact_channels", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average time span of contact channels in the database?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6102, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Compute the average active time span of contact channels.", "output": "SELECT avg(active_to_date - active_from_date) FROM customer_contact_channels", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Compute the average active time span of contact channels.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6103, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the channel code and contact number of the customer contact channel that was active for the longest time?", "output": "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)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the channel code and contact number of the customer contact channel that was active for the longest time?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6104, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the channel code and contact number of the customer contact channel whose active duration was the longest.", "output": "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)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the channel code and contact number of the customer contact channel whose active duration was the longest.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6105, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and active date of the customer that use email as the contact channel.", "output": "SELECT t1.customer_name , t2.active_from_date FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and active date of the customer that use email as the contact channel.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6106, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and active date of the customers whose contact channel code is email?", "output": "SELECT t1.customer_name , t2.active_from_date FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name and active date of the customers whose contact channel code is email?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6107, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the customer that made the order with the largest quantity?", "output": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t3.order_quantity = ( SELECT max(order_quantity) FROM order_items)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the customer that made the order with the largest quantity?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6108, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the customer who made the order of the largest amount of goods.", "output": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t3.order_quantity = ( SELECT max(order_quantity) FROM order_items)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the customer who made the order of the largest amount of goods.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6109, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the customer that has purchased the most items?", "output": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY sum(t3.order_quantity) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the customer that has purchased the most items?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6110, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the name of the customer who ordered the most items in total.", "output": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY sum(t3.order_quantity) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the name of the customer who ordered the most items in total.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6111, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the payment method of the customer that has purchased the least quantity of items?", "output": "SELECT t1.payment_method FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY sum(t3.order_quantity) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the payment method of the customer that has purchased the least quantity of items?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6112, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Tell me the payment method used by the customer who ordered the least amount of goods in total.", "output": "SELECT t1.payment_method FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY sum(t3.order_quantity) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Tell me the payment method used by the customer who ordered the least amount of goods in total.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6113, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many types of products have Rodrick Heaney bought in total?", "output": "SELECT count(DISTINCT t3.product_id) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = \"Rodrick Heaney\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many types of products have Rodrick Heaney bought in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6114, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of distinct products Rodrick Heaney has bought so far.", "output": "SELECT count(DISTINCT t3.product_id) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = \"Rodrick Heaney\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of distinct products Rodrick Heaney has bought so far.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6115, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total quantity of products purchased by \"Rodrick Heaney\"?", "output": "SELECT sum(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = \"Rodrick Heaney\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total quantity of products purchased by \"Rodrick Heaney\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6116, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Tell me the total quantity of products bought by the customer called \"Rodrick Heaney\".", "output": "SELECT sum(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = \"Rodrick Heaney\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Tell me the total quantity of products bought by the customer called \"Rodrick Heaney\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6117, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers have at least one order with status \"Cancelled\"?", "output": "SELECT count(DISTINCT customer_id) FROM customer_orders WHERE order_status = \"Cancelled\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers have at least one order with status \"Cancelled\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6118, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the number of customers who have at least one order with \"Cancelled\" status.", "output": "SELECT count(DISTINCT customer_id) FROM customer_orders WHERE order_status = \"Cancelled\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the number of customers who have at least one order with \"Cancelled\" status.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6119, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many orders have detail \"Second time\"?", "output": "SELECT count(*) FROM customer_orders WHERE order_details = \"Second time\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many orders have detail \"Second time\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6120, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Tell me the number of orders with \"Second time\" as order detail.", "output": "SELECT count(*) FROM customer_orders WHERE order_details = \"Second time\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Tell me the number of orders with \"Second time\" as order detail.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6121, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the customer name and date of the orders that have the status \"Delivered\".", "output": "SELECT t1.customer_name , t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = \"Delivered\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the customer name and date of the orders that have the status \"Delivered\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6122, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the customer name and date of the orders whose status is \"Delivered\".", "output": "SELECT t1.customer_name , t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = \"Delivered\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the customer name and date of the orders whose status is \"Delivered\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6123, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of products that are in orders with status \"Cancelled\"?", "output": "SELECT sum(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_status = \"Cancelled\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of products that are in orders with status \"Cancelled\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6124, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total quantity of products associated with the orders in the \"Cancelled\" status.", "output": "SELECT sum(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_status = \"Cancelled\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total quantity of products associated with the orders in the \"Cancelled\" status.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6125, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total amount of products ordered before 2018-03-17 07:13:53.", "output": "SELECT sum(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_date < \"2018-03-17 07:13:53\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the total amount of products ordered before 2018-03-17 07:13:53.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6126, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total amount of products purchased before 2018-03-17 07:13:53?", "output": "SELECT sum(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_date < \"2018-03-17 07:13:53\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total amount of products purchased before 2018-03-17 07:13:53?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6127, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who made the latest order?", "output": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.order_date DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who made the latest order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6128, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the customer who made an order most recently.", "output": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.order_date DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the customer who made an order most recently.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6129, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which product has been ordered most number of times?", "output": "SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which product has been ordered most number of times?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6130, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most frequently ordered product? Tell me the detail of the product", "output": "SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most frequently ordered product? Tell me the detail of the product,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6131, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and ID of the product whose total order quantity is the largest.", "output": "SELECT t2.product_details , t2.product_id FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY sum(t1.order_quantity) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and ID of the product whose total order quantity is the largest.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6132, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the name and ID of the product bought the most.", "output": "SELECT t2.product_details , t2.product_id FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY sum(t1.order_quantity) LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the name and ID of the product bought the most.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6133, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.", "output": "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\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6134, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.", "output": "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\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6135, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of customers who did not pay with Cash.", "output": "SELECT customer_name FROM customers WHERE payment_method != 'Cash'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of customers who did not pay with Cash.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6136, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of customers who do not use Cash as payment method.", "output": "SELECT customer_name FROM customers WHERE payment_method != 'Cash'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of customers who do not use Cash as payment method.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6137, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of customers who never ordered product Latte.", "output": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of customers who never ordered product Latte.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6138, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are names of customers who never ordered product Latte.", "output": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are names of customers who never ordered product Latte.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6139, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of customers who never placed an order.", "output": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of customers who never placed an order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6140, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of customers who never made an order.", "output": "SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of customers who never made an order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6141, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of customers who ordered both products Latte and Americano.", "output": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Americano'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of customers who ordered both products Latte and Americano.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "customers_and_addresses", "id": 6142, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of customers who have purchased both products Latte and Americano?", "output": "SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte' INTERSECT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Americano'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of customers who have purchased both products Latte and Americano?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6143, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many artists are there?", "output": "SELECT count(*) FROM artist", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many artists are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6144, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of artists.", "output": "SELECT count(*) FROM artist", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of artists.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6145, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the age of all music artists.", "output": "SELECT Age FROM artist", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the age of all music artists.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6146, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ages of all music artists?", "output": "SELECT Age FROM artist", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ages of all music artists?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6147, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average age of all artists?", "output": "SELECT avg(Age) FROM artist", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average age of all artists?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6148, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the average age across all artists.", "output": "SELECT avg(Age) FROM artist", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the average age across all artists.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6149, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the famous titles of the artist \"Triumfall\"?", "output": "SELECT Famous_Title FROM artist WHERE Artist = \"Triumfall\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the famous titles of the artist \"Triumfall\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6150, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the famous titles of the artist called \"Triumfall\".", "output": "SELECT Famous_Title FROM artist WHERE Artist = \"Triumfall\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the famous titles of the artist called \"Triumfall\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6151, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct Famous release dates?", "output": "SELECT distinct(Famous_Release_date) FROM artist", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct Famous release dates?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6152, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the distinct famous release dates for all artists.", "output": "SELECT distinct(Famous_Release_date) FROM artist", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the distinct famous release dates for all artists.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6153, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the dates of ceremony and the results of all music festivals", "output": "SELECT Date_of_ceremony , RESULT FROM music_festival", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the dates of ceremony and the results of all music festivals,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6154, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the dates of ceremony and results for each music festival?", "output": "SELECT Date_of_ceremony , RESULT FROM music_festival", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the dates of ceremony and results for each music festival?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6155, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the category of music festivals with result \"Awarded\"?", "output": "SELECT Category FROM music_festival WHERE RESULT = \"Awarded\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the category of music festivals with result \"Awarded\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6156, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the categories of music festivals that have the result \"Awarded\".", "output": "SELECT Category FROM music_festival WHERE RESULT = \"Awarded\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the categories of music festivals that have the result \"Awarded\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6157, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum and minimum week on top of all volumes?", "output": "SELECT max(Weeks_on_Top) , min(Weeks_on_Top) FROM volume", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the maximum and minimum week on top of all volumes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6158, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the maximum and minimum weeks on top across all volumes.", "output": "SELECT max(Weeks_on_Top) , min(Weeks_on_Top) FROM volume", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the maximum and minimum weeks on top across all volumes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6159, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the songs in volumes with more than 1 week on top?", "output": "SELECT Song FROM volume WHERE Weeks_on_Top > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the songs in volumes with more than 1 week on top?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6160, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the songs included in volumes that have more than 1 week on top.", "output": "SELECT Song FROM volume WHERE Weeks_on_Top > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the songs included in volumes that have more than 1 week on top.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6161, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please list all songs in volumes in ascending alphabetical order.", "output": "SELECT Song FROM volume ORDER BY Song", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please list all songs in volumes in ascending alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6162, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the the songs in volumes, listed in ascending order?", "output": "SELECT Song FROM volume ORDER BY Song", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the the songs in volumes, listed in ascending order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6163, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct artists do the volumes associate to?", "output": "SELECT COUNT(DISTINCT Artist_ID) FROM volume", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct artists do the volumes associate to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6164, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of distinct artists who have volumes.", "output": "SELECT COUNT(DISTINCT Artist_ID) FROM volume", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of distinct artists who have volumes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6165, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the date of ceremony of the volumes that last more than 2 weeks on top.", "output": "SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the date of ceremony of the volumes that last more than 2 weeks on top.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6166, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the dates of ceremony at music festivals corresponding to volumes that lasted more than 2 weeks on top?", "output": "SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the dates of ceremony at music festivals corresponding to volumes that lasted more than 2 weeks on top?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6167, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the songs that have result \"nominated\" at music festivals.", "output": "SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = \"Nominated\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the songs that have result \"nominated\" at music festivals.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6168, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the songs in volumes that have resulted in a nomination at music festivals?", "output": "SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = \"Nominated\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the songs in volumes that have resulted in a nomination at music festivals?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6169, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the issue dates of volumes associated with the artist \"Gorgoroth\"?", "output": "SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = \"Gorgoroth\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the issue dates of volumes associated with the artist \"Gorgoroth\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6170, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the issue dates of volumes that are by the artist named Gorgoroth.", "output": "SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = \"Gorgoroth\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the issue dates of volumes that are by the artist named Gorgoroth.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6171, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the songs in volumes associated with the artist aged 32 or older?", "output": "SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the songs in volumes associated with the artist aged 32 or older?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6172, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return names of songs in volumes that are by artists that are at least 32 years old.", "output": "SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age >= 32", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return names of songs in volumes that are by artists that are at least 32 years old.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6173, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average weeks on top of volumes associated with the artist aged 25 or younger?", "output": "SELECT avg(T2.Weeks_on_Top) FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 25", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average weeks on top of volumes associated with the artist aged 25 or younger?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6174, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the average number of weeks on top for volumes by artists that are at most 25 years old.", "output": "SELECT avg(T2.Weeks_on_Top) FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 25", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the average number of weeks on top for volumes by artists that are at most 25 years old.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6175, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the famous title of the artists associated with volumes with more than 2 weeks on top?", "output": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the famous title of the artists associated with volumes with more than 2 weeks on top?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6176, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the famous titles for artists that have volumes that lasted more than 2 weeks on top.", "output": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the famous titles for artists that have volumes that lasted more than 2 weeks on top.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6177, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please list the age and famous title of artists in descending order of age.", "output": "SELECT Famous_Title , Age FROM artist ORDER BY Age DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please list the age and famous title of artists in descending order of age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6178, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the famous titles and ages of each artist, listed in descending order by age?", "output": "SELECT Famous_Title , Age FROM artist ORDER BY Age DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the famous titles and ages of each artist, listed in descending order by age?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6179, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the famous release date of the artist with the oldest age?", "output": "SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the famous release date of the artist with the oldest age?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6180, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the famous release date for the oldest artist.", "output": "SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the famous release date for the oldest artist.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6181, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the categories of the music festivals and the count.", "output": "SELECT Category , COUNT(*) FROM music_festival GROUP BY Category", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the categories of the music festivals and the count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6182, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the number of music festivals of each category.", "output": "SELECT Category , COUNT(*) FROM music_festival GROUP BY Category", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the number of music festivals of each category.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6183, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most common result of the music festival?", "output": "SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most common result of the music festival?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6184, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the result that is most frequent at music festivals.", "output": "SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the result that is most frequent at music festivals.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6185, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the categories of the music festivals with count more than 1.", "output": "SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the categories of the music festivals with count more than 1.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6186, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the categories of music festivals for which there have been more than 1 music festival?", "output": "SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the categories of music festivals for which there have been more than 1 music festival?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6187, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the song in the volume with the maximum weeks on top?", "output": "SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the song in the volume with the maximum weeks on top?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6188, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the song in the volume that has spent the most weeks on top?", "output": "SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the song in the volume that has spent the most weeks on top?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6189, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the famous titles of artists that do not have any volume.", "output": "SELECT Famous_Title FROM artist WHERE Artist_ID NOT IN(SELECT Artist_ID FROM volume)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the famous titles of artists that do not have any volume.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6190, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the famous titles of artists who do not have any volumes?", "output": "SELECT Famous_Title FROM artist WHERE Artist_ID NOT IN(SELECT Artist_ID FROM volume)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the famous titles of artists who do not have any volumes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6191, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6192, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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?", "output": "SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top > 2 INTERSECT SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T2.Weeks_on_Top < 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6193, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the date of ceremony of music festivals with category \"Best Song\" and result \"Awarded\"?", "output": "SELECT Date_of_ceremony FROM music_festival WHERE Category = \"Best Song\" AND RESULT = \"Awarded\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the date of ceremony of music festivals with category \"Best Song\" and result \"Awarded\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6194, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the dates of ceremony corresponding to music festivals that had the category \"Best Song\" and result \"Awarded\".", "output": "SELECT Date_of_ceremony FROM music_festival WHERE Category = \"Best Song\" AND RESULT = \"Awarded\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the dates of ceremony corresponding to music festivals that had the category \"Best Song\" and result \"Awarded\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6195, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the issue date of the volume with the minimum weeks on top?", "output": "SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the issue date of the volume with the minimum weeks on top?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6196, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the issue date of the volume that has spent the fewest weeks on top.", "output": "SELECT Issue_Date FROM volume ORDER BY Weeks_on_Top ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the issue date of the volume that has spent the fewest weeks on top.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6197, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct artists have volumes?", "output": "SELECT COUNT(DISTINCT Artist_ID) FROM volume", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct artists have volumes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6198, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of artists who have had volumes.", "output": "SELECT COUNT(DISTINCT Artist_ID) FROM volume", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of artists who have had volumes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6199, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the results of music festivals and the number of music festivals that have had each, ordered by this count.", "output": "SELECT RESULT , COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please show the results of music festivals and the number of music festivals that have had each, ordered by this count.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6200, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many music festivals have had each kind of result, ordered descending by count?", "output": "SELECT RESULT , COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many music festivals have had each kind of result, ordered descending by count?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6201, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the issue dates of volumes associated with the artist aged 23 or younger?", "output": "SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the issue dates of volumes associated with the artist aged 23 or younger?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "music_4", "id": 6202, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the issue dates of volumes by artists who are at most 23 years old?", "output": "SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.age <= 23", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the issue dates of volumes by artists who are at most 23 years old?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "roller_coaster", "id": 6203, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many roller coasters are there?", "output": "SELECT count(*) FROM roller_coaster", "input": "Based on \n# the table&column(database schema) information {'roller_coaster': ['Roller_Coaster_ID', 'Name', 'Park', 'Country_ID', 'Length', 'Height', 'Speed', 'Opened', 'Status'], 'country': ['Country_ID', 'Name', 'Population', 'Area', 'Languages']} and \n# the user question: How many roller coasters are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "roller_coaster", "id": 6204, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of roller coasters by ascending order of length.", "output": "SELECT Name FROM roller_coaster ORDER BY LENGTH ASC", "input": "Based on \n# the table&column(database schema) information {'roller_coaster': ['Roller_Coaster_ID', 'Name', 'Park', 'Country_ID', 'Length', 'Height', 'Speed', 'Opened', 'Status'], 'country': ['Country_ID', 'Name', 'Population', 'Area', 'Languages']} and \n# the user question: List the names of roller coasters by ascending order of length.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "roller_coaster", "id": 6205, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the lengths and heights of roller coasters?", "output": "SELECT LENGTH , Height FROM roller_coaster", "input": "Based on \n# the table&column(database schema) information {'roller_coaster': ['Roller_Coaster_ID', 'Name', 'Park', 'Country_ID', 'Length', 'Height', 'Speed', 'Opened', 'Status'], 'country': ['Country_ID', 'Name', 'Population', 'Area', 'Languages']} and \n# the user question: What are the lengths and heights of roller coasters?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "roller_coaster", "id": 6206, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of countries whose language is not \"German\".", "output": "SELECT Name FROM country WHERE Languages != \"German\"", "input": "Based on \n# the table&column(database schema) information {'roller_coaster': ['Roller_Coaster_ID', 'Name', 'Park', 'Country_ID', 'Length', 'Height', 'Speed', 'Opened', 'Status'], 'country': ['Country_ID', 'Name', 'Population', 'Area', 'Languages']} and \n# the user question: List the names of countries whose language is not \"German\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "roller_coaster", "id": 6207, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the statuses of roller coasters longer than 3300 or higher than 100.", "output": "SELECT Status FROM roller_coaster WHERE LENGTH > 3300 OR Height > 100", "input": "Based on \n# the table&column(database schema) information {'roller_coaster': ['Roller_Coaster_ID', 'Name', 'Park', 'Country_ID', 'Length', 'Height', 'Speed', 'Opened', 'Status'], 'country': ['Country_ID', 'Name', 'Population', 'Area', 'Languages']} and \n# the user question: Show the statuses of roller coasters longer than 3300 or higher than 100.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "roller_coaster", "id": 6208, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the speeds of the longest roller coaster?", "output": "SELECT Speed FROM roller_coaster ORDER BY LENGTH DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'roller_coaster': ['Roller_Coaster_ID', 'Name', 'Park', 'Country_ID', 'Length', 'Height', 'Speed', 'Opened', 'Status'], 'country': ['Country_ID', 'Name', 'Population', 'Area', 'Languages']} and \n# the user question: What are the speeds of the longest roller coaster?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "roller_coaster", "id": 6209, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average speed of roller coasters?", "output": "SELECT avg(Speed) FROM roller_coaster", "input": "Based on \n# the table&column(database schema) information {'roller_coaster': ['Roller_Coaster_ID', 'Name', 'Park', 'Country_ID', 'Length', 'Height', 'Speed', 'Opened', 'Status'], 'country': ['Country_ID', 'Name', 'Population', 'Area', 'Languages']} and \n# the user question: What is the average speed of roller coasters?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "roller_coaster", "id": 6210, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the different statuses and the numbers of roller coasters for each status.", "output": "SELECT Status , COUNT(*) FROM roller_coaster GROUP BY Status", "input": "Based on \n# the table&column(database schema) information {'roller_coaster': ['Roller_Coaster_ID', 'Name', 'Park', 'Country_ID', 'Length', 'Height', 'Speed', 'Opened', 'Status'], 'country': ['Country_ID', 'Name', 'Population', 'Area', 'Languages']} and \n# the user question: Show the different statuses and the numbers of roller coasters for each status.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "roller_coaster", "id": 6211, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please show the most common status of roller coasters.", "output": "SELECT Status FROM roller_coaster GROUP BY Status ORDER BY COUNT(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'roller_coaster': ['Roller_Coaster_ID', 'Name', 'Park', 'Country_ID', 'Length', 'Height', 'Speed', 'Opened', 'Status'], 'country': ['Country_ID', 'Name', 'Population', 'Area', 'Languages']} and \n# the user question: Please show the most common status of roller coasters.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "roller_coaster", "id": 6212, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the status shared by more than two roller coaster.", "output": "SELECT Status FROM roller_coaster GROUP BY Status HAVING COUNT(*) > 2", "input": "Based on \n# the table&column(database schema) information {'roller_coaster': ['Roller_Coaster_ID', 'Name', 'Park', 'Country_ID', 'Length', 'Height', 'Speed', 'Opened', 'Status'], 'country': ['Country_ID', 'Name', 'Population', 'Area', 'Languages']} and \n# the user question: List the status shared by more than two roller coaster.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "roller_coaster", "id": 6213, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the park of the roller coaster with the highest speed.", "output": "SELECT Park FROM roller_coaster ORDER BY Speed DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'roller_coaster': ['Roller_Coaster_ID', 'Name', 'Park', 'Country_ID', 'Length', 'Height', 'Speed', 'Opened', 'Status'], 'country': ['Country_ID', 'Name', 'Population', 'Area', 'Languages']} and \n# the user question: Show the park of the roller coaster with the highest speed.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "roller_coaster", "id": 6214, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of roller coasters and names of country they are in.", "output": "SELECT T2.Name , T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID", "input": "Based on \n# the table&column(database schema) information {'roller_coaster': ['Roller_Coaster_ID', 'Name', 'Park', 'Country_ID', 'Length', 'Height', 'Speed', 'Opened', 'Status'], 'country': ['Country_ID', 'Name', 'Population', 'Area', 'Languages']} and \n# the user question: Show the names of roller coasters and names of country they are in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "roller_coaster", "id": 6215, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of countries that have more than one roller coaster.", "output": "SELECT T1.Name FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name HAVING COUNT(*) > 1", "input": "Based on \n# the table&column(database schema) information {'roller_coaster': ['Roller_Coaster_ID', 'Name', 'Park', 'Country_ID', 'Length', 'Height', 'Speed', 'Opened', 'Status'], 'country': ['Country_ID', 'Name', 'Population', 'Area', 'Languages']} and \n# the user question: Show the names of countries that have more than one roller coaster.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "roller_coaster", "id": 6216, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name and population of the country that has the highest roller coaster.", "output": "SELECT T1.Name , T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID ORDER BY T2.Height DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'roller_coaster': ['Roller_Coaster_ID', 'Name', 'Park', 'Country_ID', 'Length', 'Height', 'Speed', 'Opened', 'Status'], 'country': ['Country_ID', 'Name', 'Population', 'Area', 'Languages']} and \n# the user question: Show the name and population of the country that has the highest roller coaster.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "roller_coaster", "id": 6217, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of countries and the average speed of roller coasters from each country.", "output": "SELECT T1.Name , avg(T2.Speed) FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name", "input": "Based on \n# the table&column(database schema) information {'roller_coaster': ['Roller_Coaster_ID', 'Name', 'Park', 'Country_ID', 'Length', 'Height', 'Speed', 'Opened', 'Status'], 'country': ['Country_ID', 'Name', 'Population', 'Area', 'Languages']} and \n# the user question: Show the names of countries and the average speed of roller coasters from each country.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "roller_coaster", "id": 6218, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many countries do not have an roller coaster longer than 3000?", "output": "SELECT count(*) FROM country WHERE country_id NOT IN ( SELECT country_id FROM roller_coaster WHERE LENGTH > 3000 )", "input": "Based on \n# the table&column(database schema) information {'roller_coaster': ['Roller_Coaster_ID', 'Name', 'Park', 'Country_ID', 'Length', 'Height', 'Speed', 'Opened', 'Status'], 'country': ['Country_ID', 'Name', 'Population', 'Area', 'Languages']} and \n# the user question: How many countries do not have an roller coaster longer than 3000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "roller_coaster", "id": 6219, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the country names, area and population which has both roller coasters with speed higher", "output": "SELECT T1.name , T1.area , T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed > 60 INTERSECT SELECT T1.name , T1.area , T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID WHERE T2.speed < 55", "input": "Based on \n# the table&column(database schema) information {'roller_coaster': ['Roller_Coaster_ID', 'Name', 'Park', 'Country_ID', 'Length', 'Height', 'Speed', 'Opened', 'Status'], 'country': ['Country_ID', 'Name', 'Population', 'Area', 'Languages']} and \n# the user question: What are the country names, area and population which has both roller coasters with speed higher,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6220, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different captain ranks are there?", "output": "SELECT count(DISTINCT rank) FROM captain", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: How many different captain ranks are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6221, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different ranks of captain.", "output": "SELECT count(DISTINCT rank) FROM captain", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Count the number of different ranks of captain.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6222, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many captains are in each rank?", "output": "SELECT count(*) , rank FROM captain GROUP BY rank", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: How many captains are in each rank?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6223, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of captains that have each rank.", "output": "SELECT count(*) , rank FROM captain GROUP BY rank", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Count the number of captains that have each rank.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6224, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many captains with younger than 50 are in each rank?", "output": "SELECT count(*) , rank FROM captain WHERE age < 50 GROUP BY rank", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: How many captains with younger than 50 are in each rank?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6225, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of captains younger than 50 of each rank.", "output": "SELECT count(*) , rank FROM captain WHERE age < 50 GROUP BY rank", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Count the number of captains younger than 50 of each rank.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6226, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Sort all captain names by their ages from old to young.", "output": "SELECT name FROM captain ORDER BY age DESC", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Sort all captain names by their ages from old to young.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6227, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of captains, sorted by age descending?", "output": "SELECT name FROM captain ORDER BY age DESC", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: What are the names of captains, sorted by age descending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6228, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name, class and rank of all captains.", "output": "SELECT name , CLASS , rank FROM captain", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Find the name, class and rank of all captains.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6229, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names, classes, and ranks of all captains?", "output": "SELECT name , CLASS , rank FROM captain", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: What are the names, classes, and ranks of all captains?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6230, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which rank is the most common among captains?", "output": "SELECT rank FROM captain GROUP BY rank ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Which rank is the most common among captains?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6231, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the rank for which there are the fewest captains.", "output": "SELECT rank FROM captain GROUP BY rank ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Return the rank for which there are the fewest captains.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6232, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which classes have more than two captains?", "output": "SELECT CLASS FROM captain GROUP BY CLASS HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Which classes have more than two captains?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6233, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the classes that have more than two captains.", "output": "SELECT CLASS FROM captain GROUP BY CLASS HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Give the classes that have more than two captains.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6234, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of captains whose rank are either Midshipman or Lieutenant.", "output": "SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant'", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Find the name of captains whose rank are either Midshipman or Lieutenant.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6235, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of captains that have either the rank Midshipman or Lieutenant?", "output": "SELECT name FROM captain WHERE rank = 'Midshipman' OR rank = 'Lieutenant'", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: What are the names of captains that have either the rank Midshipman or Lieutenant?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6236, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average and minimum age of captains in different class?", "output": "SELECT avg(age) , min(age) , CLASS FROM captain GROUP BY CLASS", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: What are the average and minimum age of captains in different class?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6237, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the average and minimum age of captains in each class.", "output": "SELECT avg(age) , min(age) , CLASS FROM captain GROUP BY CLASS", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Return the average and minimum age of captains in each class.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6238, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the captain rank that has some captains in both Cutter and Armed schooner classes.", "output": "SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner'", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Find the captain rank that has some captains in both Cutter and Armed schooner classes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6239, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ranks of captains that are both in the Cutter and Armed schooner classes?", "output": "SELECT rank FROM captain WHERE CLASS = 'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS = 'Armed schooner'", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: What are the ranks of captains that are both in the Cutter and Armed schooner classes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6240, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the captain rank that has no captain in Third-rate ship of the line class.", "output": "SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line'", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Find the captain rank that has no captain in Third-rate ship of the line class.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6241, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ranks of captains that have no captain that are in the Third-rate ship of the line class?", "output": "SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS = 'Third-rate ship of the line'", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: What are the ranks of captains that have no captain that are in the Third-rate ship of the line class?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6242, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the youngest captain?", "output": "SELECT name FROM captain ORDER BY age LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: What is the name of the youngest captain?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6243, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name of the youngest captain.", "output": "SELECT name FROM captain ORDER BY age LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Return the name of the youngest captain.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6244, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "how many ships are there?", "output": "SELECT count(*) FROM ship", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: how many ships are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6245, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of ships.", "output": "SELECT count(*) FROM ship", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Count the number of ships.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6246, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name, type, and flag of the ship that is built in the most recent year.", "output": "SELECT name , TYPE , flag FROM ship ORDER BY built_year DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Find the name, type, and flag of the ship that is built in the most recent year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6247, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name, type, and flag of the ship that was built in the most recent year?", "output": "SELECT name , TYPE , flag FROM ship ORDER BY built_year DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: What is the name, type, and flag of the ship that was built in the most recent year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6248, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Group by ships by flag, and return number of ships that have each flag.", "output": "SELECT count(*) , flag FROM ship GROUP BY flag", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Group by ships by flag, and return number of ships that have each flag.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6249, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different ship flags, and how many ships have each?", "output": "SELECT count(*) , flag FROM ship GROUP BY flag", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: What are the different ship flags, and how many ships have each?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6250, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which flag is most widely used among all ships?", "output": "SELECT flag FROM ship GROUP BY flag ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Which flag is most widely used among all ships?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6251, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the flag that is most common among all ships.", "output": "SELECT flag FROM ship GROUP BY flag ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Return the flag that is most common among all ships.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6252, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all ship names in the order of built year and class.", "output": "SELECT name FROM ship ORDER BY built_year , CLASS", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: List all ship names in the order of built year and class.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6253, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of ships, ordered by year they were built and their class?", "output": "SELECT name FROM ship ORDER BY built_year , CLASS", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: What are the names of ships, ordered by year they were built and their class?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6254, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the ship type that are used by both ships with Panama and Malta flags.", "output": "SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta'", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Find the ship type that are used by both ships with Panama and Malta flags.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6255, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What types of ships have both ships that have Panama Flags and Malta flags?", "output": "SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta'", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: What types of ships have both ships that have Panama Flags and Malta flags?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6256, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In which year were most of ships built?", "output": "SELECT built_year FROM ship GROUP BY built_year ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: In which year were most of ships built?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6257, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the year in which most ships were built?", "output": "SELECT built_year FROM ship GROUP BY built_year ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: What is the year in which most ships were built?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6258, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the ships that have more than one captain.", "output": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Find the name of the ships that have more than one captain.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6259, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of ships that have more than one captain?", "output": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id GROUP BY t2.ship_id HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: What are the names of ships that have more than one captain?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6260, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what are the names and classes of the ships that do not have any captain yet?", "output": "SELECT name , CLASS FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain)", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: what are the names and classes of the ships that do not have any captain yet?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6261, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the names and classes of ships that do not have a captain?", "output": "SELECT name , CLASS FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain)", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Return the names and classes of ships that do not have a captain?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6262, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the ship that is steered by the youngest captain.", "output": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Find the name of the ship that is steered by the youngest captain.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6263, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the ship that is commanded by the youngest captain?", "output": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id ORDER BY t2.age LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: What is the name of the ship that is commanded by the youngest captain?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6264, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and flag of ships that are not steered by any captain with Midshipman rank.", "output": "SELECT name , flag FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman')", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Find the name and flag of ships that are not steered by any captain with Midshipman rank.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6265, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and flags of ships that do not have a captain with the rank of Midshipman?", "output": "SELECT name , flag FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain WHERE rank = 'Midshipman')", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: What are the names and flags of ships that do not have a captain with the rank of Midshipman?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6266, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the ships that are steered by both a captain with Midshipman rank and a captain with Lieutenant rank.", "output": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Midshipman' INTERSECT SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Lieutenant'", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: Find the name of the ships that are steered by both a captain with Midshipman rank and a captain with Lieutenant rank.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "ship_1", "id": 6267, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant?", "output": "SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Midshipman' INTERSECT SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Lieutenant'", "input": "Based on \n# the table&column(database schema) information {'captain': ['Captain_ID', 'Name', 'Ship_ID', 'age', 'Class', 'Rank'], 'Ship': ['Ship_ID', 'Name', 'Type', 'Built_Year', 'Class', 'Flag']} and \n# the user question: What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6268, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is id of the city that hosted events in the most recent year?", "output": "SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is id of the city that hosted events in the most recent year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6269, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the city that hosted some events in the most recent year. What is the id of this city?", "output": "SELECT host_city FROM hosting_city ORDER BY YEAR DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the city that hosted some events in the most recent year. What is the id of this city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6270, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the match ids of the cities that hosted competition \"1994 FIFA World Cup qualification\"?", "output": "SELECT match_id FROM MATCH WHERE competition = \"1994 FIFA World Cup qualification\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the match ids of the cities that hosted competition \"1994 FIFA World Cup qualification\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6271, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the match id of the competition called \"1994 FIFA World Cup qualification\"?", "output": "SELECT match_id FROM MATCH WHERE competition = \"1994 FIFA World Cup qualification\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the match id of the competition called \"1994 FIFA World Cup qualification\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6272, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the cities which were once a host city after 2010?", "output": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the cities which were once a host city after 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6273, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which cities served as a host city after 2010?", "output": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year > 2010", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which cities served as a host city after 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6274, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which city has hosted the most events?", "output": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY T2.host_city ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which city has hosted the most events?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6275, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the city that hosted the most events.", "output": "SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY T2.host_city ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the city that hosted the most events.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6276, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the venue of the competition \"1994 FIFA World Cup qualification\" hosted by \"Nanjing ( Jiangsu )\"?", "output": "SELECT T3.venue FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city JOIN MATCH AS T3 ON T2.match_id = T3.match_id WHERE T1.city = \"Nanjing ( Jiangsu )\" AND T3.competition = \"1994 FIFA World Cup qualification\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the venue of the competition \"1994 FIFA World Cup qualification\" hosted by \"Nanjing ( Jiangsu )\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6277, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the venue of the competition \"1994 FIFA World Cup qualification\" which was hosted by \"Nanjing ( Jiangsu )\".", "output": "SELECT T3.venue FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city JOIN MATCH AS T3 ON T2.match_id = T3.match_id WHERE T1.city = \"Nanjing ( Jiangsu )\" AND T3.competition = \"1994 FIFA World Cup qualification\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the venue of the competition \"1994 FIFA World Cup qualification\" which was hosted by \"Nanjing ( Jiangsu )\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6278, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the temperature of Shanghai in January.", "output": "SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = \"Shanghai\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the temperature of Shanghai in January.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6279, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the temperature of \"Shanghai\" city in January?", "output": "SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = \"Shanghai\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the temperature of \"Shanghai\" city in January?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6280, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the host year of city \"Taizhou ( Zhejiang )\"?", "output": "SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = \"Taizhou ( Zhejiang )\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the host year of city \"Taizhou ( Zhejiang )\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6281, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "IN which year did city \"Taizhou ( Zhejiang )\" serve as a host city?", "output": "SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = \"Taizhou ( Zhejiang )\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: IN which year did city \"Taizhou ( Zhejiang )\" serve as a host city?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6282, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which three cities have the largest regional population?", "output": "SELECT city FROM city ORDER BY regional_population DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which three cities have the largest regional population?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6283, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the three largest cities in terms of regional population?", "output": "SELECT city FROM city ORDER BY regional_population DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the three largest cities in terms of regional population?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6284, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which city has the lowest GDP? Please list the city name and its GDP.", "output": "SELECT city , GDP FROM city ORDER BY GDP LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which city has the lowest GDP? Please list the city name and its GDP.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6285, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the city with the smallest GDP? Return the city and its GDP.", "output": "SELECT city , GDP FROM city ORDER BY GDP LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the city with the smallest GDP? Return the city and its GDP.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6286, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which city has the highest temperature in February?", "output": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id ORDER BY T2.Feb DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which city has the highest temperature in February?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6287, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In February, which city marks the highest temperature?", "output": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id ORDER BY T2.Feb DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: In February, which city marks the highest temperature?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6288, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct?", "output": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul OR T2.Mar > T2.Oct", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6289, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which cities' temperature in March is lower than that in July or higher than that in Oct?", "output": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul OR T2.Mar > T2.Oct", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which cities' temperature in March is lower than that in July or higher than that in Oct?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6290, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities?", "output": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul INTERSECT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6291, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which cities have lower temperature in March than in July and have been once host cities?", "output": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul INTERSECT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which cities have lower temperature in March than in July and have been once host cities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6292, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me a list of cities whose temperature in Mar is lower than that in Dec and which have never been host cities.", "output": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Dec EXCEPT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me a list of cities whose temperature in Mar is lower than that in Dec and which have never been host cities.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6293, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which cities have lower temperature in March than in Dec and have never served as host cities?", "output": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Dec EXCEPT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which cities have lower temperature in March than in Dec and have never served as host cities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6294, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities?", "output": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Feb > T2.Jun UNION SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6295, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which cities have higher temperature in Feb than in Jun or have once served as host cities?", "output": "SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Feb > T2.Jun UNION SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which cities have higher temperature in Feb than in Jun or have once served as host cities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6296, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please give me a list of cities whose regional population is over 10000000.", "output": "SELECT city FROM city WHERE regional_population > 10000000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please give me a list of cities whose regional population is over 10000000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6297, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which cities have regional population above 10000000?", "output": "SELECT city FROM city WHERE regional_population > 10000000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which cities have regional population above 10000000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6298, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Please give me a list of cities whose regional population is over 8000000 or under 5000000.", "output": "SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Please give me a list of cities whose regional population is over 8000000 or under 5000000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6299, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which cities have regional population above 8000000 or below 5000000?", "output": "SELECT city FROM city WHERE regional_population > 10000000 UNION SELECT city FROM city WHERE regional_population < 5000000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which cities have regional population above 8000000 or below 5000000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6300, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of matches in different competitions.", "output": "SELECT count(*) , Competition FROM MATCH GROUP BY Competition", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of matches in different competitions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6301, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each competition, count the number of matches.", "output": "SELECT count(*) , Competition FROM MATCH GROUP BY Competition", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each competition, count the number of matches.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6302, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List venues of all matches in the order of their dates starting from the most recent one.", "output": "SELECT venue FROM MATCH ORDER BY date DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List venues of all matches in the order of their dates starting from the most recent one.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6303, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the venues of all the matches? Sort them in the descending order of match date.", "output": "SELECT venue FROM MATCH ORDER BY date DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the venues of all the matches? Sort them in the descending order of match date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6304, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what is the GDP of the city with the largest population.", "output": "SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what is the GDP of the city with the largest population.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6305, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the GDP of the city with the largest regional population.", "output": "SELECT gdp FROM city ORDER BY Regional_Population DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the GDP of the city with the largest regional population.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6306, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the GDP and population of the city that already served as a host more than once?", "output": "SELECT t1.gdp , t1.Regional_Population FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY t2.Host_City HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the GDP and population of the city that already served as a host more than once?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "city_record", "id": 6307, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which cities have served as host cities more than once? Return me their GDP and population.", "output": "SELECT t1.gdp , t1.Regional_Population FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY t2.Host_City HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which cities have served as host cities more than once? Return me their GDP and population.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6308, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List every individual's first name, middle name and last name in alphabetical order by last name.", "output": "SELECT individual_first_name , individual_middle_name , individual_last_name FROM individuals ORDER BY individual_last_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List every individual's first name, middle name and last name in alphabetical order by last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6309, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first, middle, and last names of all individuals, ordered by last name?", "output": "SELECT individual_first_name , individual_middle_name , individual_last_name FROM individuals ORDER BY individual_last_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first, middle, and last names of all individuals, ordered by last name?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6310, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the types of forms.", "output": "SELECT DISTINCT form_type_code FROM forms", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the types of forms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6311, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different types of forms?", "output": "SELECT DISTINCT form_type_code FROM forms", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different types of forms?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6312, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the most popular party form.", "output": "SELECT t1.form_name FROM forms AS t1 JOIN party_forms AS t2 ON t1.form_id = t2.form_id GROUP BY t2.form_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the most popular party form.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6313, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the party form that is most common?", "output": "SELECT t1.form_name FROM forms AS t1 JOIN party_forms AS t2 ON t1.form_id = t2.form_id GROUP BY t2.form_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the party form that is most common?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6314, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the payment method and phone of the party with email \"enrico09@example.com\".", "output": "SELECT payment_method_code , party_phone FROM parties WHERE party_email = \"enrico09@example.com\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the payment method and phone of the party with email \"enrico09@example.com\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6315, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the payment method code and party phone of the party with the email 'enrico09@example.com'?", "output": "SELECT payment_method_code , party_phone FROM parties WHERE party_email = \"enrico09@example.com\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the payment method code and party phone of the party with the email 'enrico09@example.com'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6316, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the emails of parties with the most popular party form.", "output": "SELECT t1.party_email FROM parties AS t1 JOIN party_forms AS t2 ON t1.party_id = t2.party_id WHERE t2.form_id = (SELECT form_id FROM party_forms GROUP BY form_id ORDER BY count(*) DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the emails of parties with the most popular party form.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6317, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the party emails associated with parties that used the party form that is the most common?", "output": "SELECT t1.party_email FROM parties AS t1 JOIN party_forms AS t2 ON t1.party_id = t2.party_id WHERE t2.form_id = (SELECT form_id FROM party_forms GROUP BY form_id ORDER BY count(*) DESC LIMIT 1)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the party emails associated with parties that used the party form that is the most common?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6318, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the name of organizations in order of the date formed.", "output": "SELECT organization_name FROM organizations ORDER BY date_formed ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the name of organizations in order of the date formed.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6319, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of organizations, ordered by the date they were formed, ascending?", "output": "SELECT organization_name FROM organizations ORDER BY date_formed ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of organizations, ordered by the date they were formed, ascending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6320, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the youngest organization.", "output": "SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the youngest organization.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6321, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the organization that was formed most recently?", "output": "SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the organization that was formed most recently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6322, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last name of the latest contact individual of the organization \"Labour Party\".", "output": "SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.organization_name = \"Labour Party\" ORDER BY t2.date_contact_to DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the last name of the latest contact individual of the organization \"Labour Party\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6323, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last name of the contact individual from the Labour party organization who was contacted most recently?", "output": "SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.organization_name = \"Labour Party\" ORDER BY t2.date_contact_to DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the last name of the contact individual from the Labour party organization who was contacted most recently?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6324, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last name of the first ever contact person of the organization with the highest UK Vat number.", "output": "SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.uk_vat_number = (SELECT max(uk_vat_number) FROM organizations) ORDER BY t2.date_contact_to ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the last name of the first ever contact person of the organization with the highest UK Vat number.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6325, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the last name of the first individual contacted from the organization with the maximum UK Vat number across all organizations?", "output": "SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.uk_vat_number = (SELECT max(uk_vat_number) FROM organizations) ORDER BY t2.date_contact_to ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the last name of the first individual contacted from the organization with the maximum UK Vat number across all organizations?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6326, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many services are there?", "output": "SELECT count(*) FROM services", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many services are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6327, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of services.", "output": "SELECT count(*) FROM services", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of services.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6328, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find name of the services that has never been used.", "output": "SELECT service_name FROM services EXCEPT SELECT t1.service_name FROM services AS t1 JOIN party_services AS t2 ON t1.service_id = t2.service_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find name of the services that has never been used.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6329, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the services that have never been used?", "output": "SELECT service_name FROM services EXCEPT SELECT t1.service_name FROM services AS t1 JOIN party_services AS t2 ON t1.service_id = t2.service_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the services that have never been used?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6330, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of all the cities and states.", "output": "SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of all the cities and states.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6331, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all cities and states?", "output": "SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all cities and states?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6332, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many cities are there in state \"Colorado\"?", "output": "SELECT count(*) FROM addresses WHERE state_province_county = \"Colorado\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many cities are there in state \"Colorado\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6333, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of cities in the state of Colorado.", "output": "SELECT count(*) FROM addresses WHERE state_province_county = \"Colorado\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of cities in the state of Colorado.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6334, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the payment method code used by more than 3 parties.", "output": "SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING count(*) > 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the payment method code used by more than 3 parties.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6335, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the payment method codes that have been used by more than 3 parties?", "output": "SELECT payment_method_code FROM parties GROUP BY payment_method_code HAVING count(*) > 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the payment method codes that have been used by more than 3 parties?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6336, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of organizations whose names contain \"Party\".", "output": "SELECT organization_name FROM organizations WHERE organization_name LIKE \"%Party%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of organizations whose names contain \"Party\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6337, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of organizations that contain the word \"Party\"?", "output": "SELECT organization_name FROM organizations WHERE organization_name LIKE \"%Party%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of organizations that contain the word \"Party\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6338, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many distinct payment methods are used by parties?", "output": "SELECT count(DISTINCT payment_method_code) FROM parties", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many distinct payment methods are used by parties?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6339, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different payment method codes used by parties.", "output": "SELECT count(DISTINCT payment_method_code) FROM parties", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of different payment method codes used by parties.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6340, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which is the email of the party that has used the services the most number of times?", "output": "SELECT t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id = t2.customer_id GROUP BY t1.party_email ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which is the email of the party that has used the services the most number of times?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6341, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the party email that has used party services the greatest number of times.", "output": "SELECT t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id = t2.customer_id GROUP BY t1.party_email ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the party email that has used party services the greatest number of times.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6342, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which state can address \"6862 Kaitlyn Knolls\" possibly be in?", "output": "SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE \"%6862 Kaitlyn Knolls%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which state can address \"6862 Kaitlyn Knolls\" possibly be in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6343, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the state corresponding to the line number building \"6862 Kaitlyn Knolls\".", "output": "SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE \"%6862 Kaitlyn Knolls%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the state corresponding to the line number building \"6862 Kaitlyn Knolls\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6344, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of organization that has the greatest number of contact individuals?", "output": "SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id GROUP BY t1.organization_name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of organization that has the greatest number of contact individuals?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6345, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the name of the organization which has the most contact individuals.", "output": "SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id GROUP BY t1.organization_name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the name of the organization which has the most contact individuals.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6346, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the last name of the individuals that have been contact individuals of an organization.", "output": "SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the last name of the individuals that have been contact individuals of an organization.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "e_government", "id": 6347, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the last names of individuals who have been contact individuals for an organization?", "output": "SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id = t2.individual_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the last names of individuals who have been contact individuals for an organization?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6348, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many drivers are there?", "output": "SELECT count(*) FROM driver", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many drivers are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6349, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name, home city, and age for all drivers.", "output": "SELECT name , home_city , age FROM driver", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name, home city, and age for all drivers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6350, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the party and the number of drivers in each party.", "output": "SELECT party , count(*) FROM driver GROUP BY party", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the party and the number of drivers in each party.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6351, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name of drivers in descending order of age.", "output": "SELECT name FROM driver ORDER BY age DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name of drivers in descending order of age.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6352, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all different home cities.", "output": "SELECT DISTINCT home_city FROM driver", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all different home cities.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6353, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the home city with the most number of drivers.", "output": "SELECT home_city FROM driver GROUP BY home_city ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the home city with the most number of drivers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6354, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the party with drivers from Hartford and drivers older than 40.", "output": "SELECT party FROM driver WHERE home_city = 'Hartford' AND age > 40", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the party with drivers from Hartford and drivers older than 40.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6355, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show home city where at least two drivers older than 40 are from.", "output": "SELECT home_city FROM driver WHERE age > 40 GROUP BY home_city HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show home city where at least two drivers older than 40 are from.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6356, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all home cities except for those having a driver older than 40.", "output": "SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver WHERE age > 40", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all home cities except for those having a driver older than 40.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6357, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of the drivers without a school bus.", "output": "SELECT name FROM driver WHERE driver_id NOT IN (SELECT driver_id FROM school_bus)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of the drivers without a school bus.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6358, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the types of schools that have two schools.", "output": "SELECT TYPE FROM school GROUP BY TYPE HAVING count(*) = 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the types of schools that have two schools.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6359, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the school name and driver name for all school buses.", "output": "SELECT T2.school , T3.name FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN driver AS T3 ON T1.driver_id = T3.driver_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the school name and driver name for all school buses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6360, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum, minimum and average years spent working on a school bus?", "output": "SELECT max(years_working) , min(years_working) , avg(years_working) FROM school_bus", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the maximum, minimum and average years spent working on a school bus?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6361, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the school name and type for schools without a school bus.", "output": "SELECT school , TYPE FROM school WHERE school_id NOT IN (SELECT school_id FROM school_bus)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the school name and type for schools without a school bus.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6362, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the type of school and the number of buses for each type.", "output": "SELECT T2.type , count(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T2.type", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the type of school and the number of buses for each type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6363, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many drivers are from Hartford city or younger than 40?", "output": "SELECT count(*) FROM driver WHERE home_city = 'Hartford' OR age < 40", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many drivers are from Hartford city or younger than 40?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6364, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List names for drivers from Hartford city and younger than 40.", "output": "SELECT name FROM driver WHERE home_city = 'Hartford' AND age < 40", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List names for drivers from Hartford city and younger than 40.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "school_bus", "id": 6365, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "find the name of driver who is driving the school bus with the longest working history.", "output": "SELECT t1.name FROM driver AS t1 JOIN school_bus AS t2 ON t1.driver_id = t2.driver_id ORDER BY years_working DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: find the name of driver who is driving the school bus with the longest working history.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6366, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many flights have a velocity larger than 200?", "output": "SELECT count(*) FROM flight WHERE velocity > 200", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many flights have a velocity larger than 200?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6367, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the vehicle flight number, date and pilot of all the flights, ordered by altitude.", "output": "SELECT vehicle_flight_number , date , pilot FROM flight ORDER BY altitude ASC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the vehicle flight number, date and pilot of all the flights, ordered by altitude.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6368, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the id, country, city and name of the airports ordered alphabetically by the name.", "output": "SELECT id , country , city , name FROM airport ORDER BY name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the id, country, city and name of the airports ordered alphabetically by the name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6369, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is maximum group equity shareholding of the companies?", "output": "SELECT max(group_equity_shareholding) FROM operate_company", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is maximum group equity shareholding of the companies?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6370, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the velocity of the pilot named 'Thompson'?", "output": "SELECT avg(velocity) FROM flight WHERE pilot = 'Thompson'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the velocity of the pilot named 'Thompson'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6371, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and types of the companies that have ever operated a flight?", "output": "SELECT T1.name , T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and types of the companies that have ever operated a flight?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6372, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the airports which are not in the country 'Iceland'?", "output": "SELECT name FROM airport WHERE country != 'Iceland'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the airports which are not in the country 'Iceland'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6373, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct types of the companies that have operated any flights with velocity less than 200?", "output": "SELECT DISTINCT T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T2.velocity < 200", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct types of the companies that have operated any flights with velocity less than 200?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6374, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and names of the companies that operated more than one flight?", "output": "SELECT T1.id , T1.name FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id GROUP BY T1.id HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids and names of the companies that operated more than one flight?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6375, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id, name and IATA code of the airport that had most number of flights?", "output": "SELECT T1.id , T1.name , T1.IATA FROM airport AS T1 JOIN flight AS T2 ON T1.id = T2.airport_id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id, name and IATA code of the airport that had most number of flights?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6376, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different pilot names who had piloted a flight in the country 'United States' or in the airport named 'Billund Airport'?", "output": "SELECT DISTINCT T2.pilot FROM airport AS T1 JOIN flight AS T2 ON T1.id = T2.airport_id WHERE T1.country = 'United States' OR T1.name = 'Billund Airport'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different pilot names who had piloted a flight in the country 'United States' or in the airport named 'Billund Airport'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6377, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most common company type, and how many are there?", "output": "SELECT TYPE , count(*) FROM operate_company GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most common company type, and how many are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6378, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many airports haven't the pilot 'Thompson' driven an aircraft?", "output": "SELECT count(*) FROM airport WHERE id NOT IN ( SELECT airport_id FROM flight WHERE pilot = 'Thompson' );", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many airports haven't the pilot 'Thompson' driven an aircraft?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6379, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T1.principal_activities = 'Cargo' INTERSECT SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id WHERE T1.principal_activities = 'Catering services'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6380, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which of the airport names contains the word 'international'?", "output": "SELECT name FROM airport WHERE name LIKE '%international%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which of the airport names contains the word 'international'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6381, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many companies operates airlines in each airport?", "output": "SELECT T3.id , count(*) FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id JOIN airport AS T3 ON T2.airport_id = T3.id GROUP BY T3.id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many companies operates airlines in each airport?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6382, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "how many airports are there in each country?", "output": "SELECT count(*) , country FROM airport GROUP BY country", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: how many airports are there in each country?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6383, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "which countries have more than 2 airports?", "output": "SELECT country FROM airport GROUP BY country HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: which countries have more than 2 airports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_company", "id": 6384, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "which pilot is in charge of the most number of flights?", "output": "SELECT pilot FROM flight GROUP BY pilot ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: which pilot is in charge of the most number of flights?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6385, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many accounts do we have?", "output": "SELECT count(*) FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many accounts do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6386, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of accounts.", "output": "SELECT count(*) FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6387, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all account ids and account details.", "output": "SELECT account_id , account_details FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all account ids and account details.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6388, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and details of all accounts?", "output": "SELECT account_id , account_details FROM Accounts", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids and details of all accounts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6389, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many statements do we have?", "output": "SELECT count(*) FROM Statements", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many statements do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6390, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of statements.", "output": "SELECT count(*) FROM Statements", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of statements.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6391, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all statement ids and statement details.", "output": "SELECT STATEMENT_ID , statement_details FROM Statements", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all statement ids and statement details.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6392, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and details of all statements?", "output": "SELECT STATEMENT_ID , statement_details FROM Statements", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids and details of all statements?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6393, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show statement id, statement detail, account detail for accounts.", "output": "SELECT T1.statement_id , T2.statement_details , T1.account_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show statement id, statement detail, account detail for accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6394, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the statement ids, statement details, and account details, for all accounts?", "output": "SELECT T1.statement_id , T2.statement_details , T1.account_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the statement ids, statement details, and account details, for all accounts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6395, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all statement id and the number of accounts for each statement.", "output": "SELECT STATEMENT_ID , count(*) FROM Accounts GROUP BY STATEMENT_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all statement id and the number of accounts for each statement.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6396, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different statement ids on accounts, and the number of accounts for each?", "output": "SELECT STATEMENT_ID , count(*) FROM Accounts GROUP BY STATEMENT_ID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different statement ids on accounts, and the number of accounts for each?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6397, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the statement id and the statement detail for the statement with most number of accounts.", "output": "SELECT T1.statement_id , T2.statement_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id GROUP BY T1.statement_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the statement id and the statement detail for the statement with most number of accounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6398, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the statement id and statement detail for the statement that has the most corresponding accounts?", "output": "SELECT T1.statement_id , T2.statement_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id GROUP BY T1.statement_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the statement id and statement detail for the statement that has the most corresponding accounts?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6399, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of documents.", "output": "SELECT count(*) FROM Documents", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6400, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of documents.", "output": "SELECT count(*) FROM Documents", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6401, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the document type code, document name, and document description for the document with name 'Noel CV' or name 'King Book'.", "output": "SELECT document_type_code , document_name , document_description FROM Documents WHERE document_name = 'Noel CV' OR document_name = 'King Book'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the document type code, document name, and document description for the document with name 'Noel CV' or name 'King Book'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6402, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the type come, name, and description of the document that has either the name 'Noel CV' or 'King Book'?", "output": "SELECT document_type_code , document_name , document_description FROM Documents WHERE document_name = 'Noel CV' OR document_name = 'King Book'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the type come, name, and description of the document that has either the name 'Noel CV' or 'King Book'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6403, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ids and names of all documents.", "output": "SELECT document_id , document_name FROM Documents", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the ids and names of all documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6404, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and names for each of the documents?", "output": "SELECT document_id , document_name FROM Documents", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids and names for each of the documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6405, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find names and ids of all documents with document type code BK.", "output": "SELECT document_name , document_id FROM Documents WHERE document_type_code = \"BK\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find names and ids of all documents with document type code BK.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6406, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and ids of documents that have the type code BK?", "output": "SELECT document_name , document_id FROM Documents WHERE document_type_code = \"BK\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and ids of documents that have the type code BK?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6407, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many documents are with document type code BK for each product id?", "output": "SELECT count(*) , project_id FROM Documents WHERE document_type_code = \"BK\" GROUP BY project_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many documents are with document type code BK for each product id?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6408, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of documents with the type code BK that correspond to each product id.", "output": "SELECT count(*) , project_id FROM Documents WHERE document_type_code = \"BK\" GROUP BY project_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of documents with the type code BK that correspond to each product id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6409, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the document name and the document date for all documents on project with details 'Graph Database project'.", "output": "SELECT document_name , document_date FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'Graph Database project'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the document name and the document date for all documents on project with details 'Graph Database project'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6410, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and dates for documents corresponding to project that has the details 'Graph Database project'?", "output": "SELECT document_name , document_date FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'Graph Database project'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and dates for documents corresponding to project that has the details 'Graph Database project'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6411, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show project ids and the number of documents in each project.", "output": "SELECT project_id , count(*) FROM Documents GROUP BY project_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show project ids and the number of documents in each project.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6412, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many documents correspond with each project id?", "output": "SELECT project_id , count(*) FROM Documents GROUP BY project_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many documents correspond with each project id?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6413, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the project with least number of documents?", "output": "SELECT project_id FROM Documents GROUP BY project_id ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the project with least number of documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6414, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the id of the project that has the fewest corresponding documents.", "output": "SELECT project_id FROM Documents GROUP BY project_id ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the id of the project that has the fewest corresponding documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6415, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ids for projects with at least 2 documents.", "output": "SELECT project_id FROM Documents GROUP BY project_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the ids for projects with at least 2 documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6416, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are project ids of projects that have 2 or more corresponding documents?", "output": "SELECT project_id FROM Documents GROUP BY project_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are project ids of projects that have 2 or more corresponding documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6417, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List document type codes and the number of documents in each code.", "output": "SELECT document_type_code , count(*) FROM Documents GROUP BY document_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List document type codes and the number of documents in each code.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6418, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many documents are there of each type?", "output": "SELECT document_type_code , count(*) FROM Documents GROUP BY document_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many documents are there of each type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6419, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the document type code with most number of documents?", "output": "SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the document type code with most number of documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6420, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the code of the document type that is most common.", "output": "SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the code of the document type that is most common.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6421, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the document type code with fewer than 3 documents.", "output": "SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING count(*) < 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the document type code with fewer than 3 documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6422, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the codes corresponding to document types for which there are less than 3 documents?", "output": "SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING count(*) < 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the codes corresponding to document types for which there are less than 3 documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6423, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the statement detail and the corresponding document name for the statement with detail 'Private Project'.", "output": "SELECT T1.statement_details , T2.document_name FROM Statements AS T1 JOIN Documents AS T2 ON T1.statement_id = T2.document_id WHERE T1.statement_details = 'Private Project'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the statement detail and the corresponding document name for the statement with detail 'Private Project'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6424, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details for statements with the details 'Private Project', and what are the names of the corresponding documents?", "output": "SELECT T1.statement_details , T2.document_name FROM Statements AS T1 JOIN Documents AS T2 ON T1.statement_id = T2.document_id WHERE T1.statement_details = 'Private Project'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details for statements with the details 'Private Project', and what are the names of the corresponding documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6425, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all document type codes, document type names, document type descriptions.", "output": "SELECT document_type_code , document_type_name , document_type_description FROM Ref_document_types", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all document type codes, document type names, document type descriptions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6426, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the codes, names, and descriptions of the different document types?", "output": "SELECT document_type_code , document_type_name , document_type_description FROM Ref_document_types", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the codes, names, and descriptions of the different document types?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6427, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the document type description for document type named Film?", "output": "SELECT document_type_description FROM Ref_document_types WHERE document_type_name = \"Film\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the document type description for document type named Film?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6428, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the description of the document type name 'Film'.", "output": "SELECT document_type_description FROM Ref_document_types WHERE document_type_name = \"Film\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the description of the document type name 'Film'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6429, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the document type name and the document type description and creation date for all the documents?", "output": "SELECT T1.document_type_name , T1.document_type_description , T2.Document_date FROM Ref_document_types AS T1 JOIN Documents AS T2 ON T1.document_type_code = T2.document_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the document type name and the document type description and creation date for all the documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6430, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the type name, type description, and date of creation for each document.", "output": "SELECT T1.document_type_name , T1.document_type_description , T2.Document_date FROM Ref_document_types AS T1 JOIN Documents AS T2 ON T1.document_type_code = T2.document_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the type name, type description, and date of creation for each document.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6431, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of projects.", "output": "SELECT count(*) FROM Projects", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of projects.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6432, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many projects are there?", "output": "SELECT count(*) FROM Projects", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many projects are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6433, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List ids and details for all projects.", "output": "SELECT project_id , project_details FROM Projects", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List ids and details for all projects.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6434, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and details for each project?", "output": "SELECT project_id , project_details FROM Projects", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids and details for each project?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6435, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the project id and detail for the project with at least two documents?", "output": "SELECT T1.project_id , T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the project id and detail for the project with at least two documents?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6436, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the ids and details corresponding to projects for which there are more than two documents.", "output": "SELECT T1.project_id , T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id HAVING count(*) > 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the ids and details corresponding to projects for which there are more than two documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6437, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the project detail for the project with document \"King Book\"?", "output": "SELECT T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id WHERE T2.document_name = \"King Book\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the project detail for the project with document \"King Book\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6438, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the details of the project with the document name 'King Book'.", "output": "SELECT T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id WHERE T2.document_name = \"King Book\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the details of the project with the document name 'King Book'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6439, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many budget types do we have?", "output": "SELECT count(*) FROM Ref_budget_codes", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many budget types do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6440, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of budget codes.", "output": "SELECT count(*) FROM Ref_budget_codes", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of budget codes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6441, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all budget type codes and descriptions.", "output": "SELECT budget_type_code , budget_type_description FROM Ref_budget_codes", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all budget type codes and descriptions.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6442, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the type codes and descriptions of each budget type?", "output": "SELECT budget_type_code , budget_type_description FROM Ref_budget_codes", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the type codes and descriptions of each budget type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6443, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the description for the budget type with code ORG?", "output": "SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = \"ORG\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the description for the budget type with code ORG?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6444, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the description of the budget type that has the code ORG.", "output": "SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = \"ORG\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the description of the budget type that has the code ORG.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6445, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many documents have expenses?", "output": "SELECT count(*) FROM Documents_with_expenses", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many documents have expenses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6446, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of documents with expenses.", "output": "SELECT count(*) FROM Documents_with_expenses", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of documents with expenses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6447, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the document ids for the budget type code 'SF'?", "output": "SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the document ids for the budget type code 'SF'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6448, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the ids of documents with expenses that have the budget code 'SF'.", "output": "SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the ids of documents with expenses that have the budget code 'SF'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6449, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the budget type code and description and the corresponding document id.", "output": "SELECT T2.budget_type_code , T2.budget_type_description , T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_budget_codes AS T2 ON T1.budget_type_code = T2.budget_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the budget type code and description and the corresponding document id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6450, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the budget type codes, budget type descriptions and document ids for documents with expenses.", "output": "SELECT T2.budget_type_code , T2.budget_type_description , T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_budget_codes AS T2 ON T1.budget_type_code = T2.budget_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the budget type codes, budget type descriptions and document ids for documents with expenses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6451, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show ids for all documents with budget types described as 'Government'.", "output": "SELECT T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_code = T2.Budget_Type_code WHERE T2.budget_type_Description = \"Government\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show ids for all documents with budget types described as 'Government'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6452, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the ids for documents that have the budget description 'Government'.", "output": "SELECT T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_code = T2.Budget_Type_code WHERE T2.budget_type_Description = \"Government\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the ids for documents that have the budget description 'Government'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6453, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show budget type codes and the number of documents in each budget type.", "output": "SELECT budget_type_code , count(*) FROM Documents_with_expenses GROUP BY budget_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show budget type codes and the number of documents in each budget type.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6454, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the different budget type codes, and how many documents are there for each?", "output": "SELECT budget_type_code , count(*) FROM Documents_with_expenses GROUP BY budget_type_code", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the different budget type codes, and how many documents are there for each?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6455, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the budget type code with most number of documents.", "output": "SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the budget type code with most number of documents.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6456, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the budget type code that is most common among documents with expenses.", "output": "SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the budget type code that is most common among documents with expenses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6457, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of documents which don't have expense budgets?", "output": "SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of documents which don't have expense budgets?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6458, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the ids of documents that do not have expenses.", "output": "SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the ids of documents that do not have expenses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6459, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show ids for all documents in type CV without expense budgets.", "output": "SELECT document_id FROM Documents WHERE document_type_code = \"CV\" EXCEPT SELECT document_id FROM Documents_with_expenses", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show ids for all documents in type CV without expense budgets.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6460, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of documents with the type code CV that do not have expenses.", "output": "SELECT document_id FROM Documents WHERE document_type_code = \"CV\" EXCEPT SELECT document_id FROM Documents_with_expenses", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of documents with the type code CV that do not have expenses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6461, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of documents with letter 's' in the name with any expense budgets.", "output": "SELECT T1.document_id FROM Documents AS T1 JOIN Documents_with_expenses AS T2 ON T1.document_id = T2.document_id WHERE T1.document_name LIKE '%s%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of documents with letter 's' in the name with any expense budgets.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6462, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the ids of documents that have expenses and contain the letter s in their names.", "output": "SELECT T1.document_id FROM Documents AS T1 JOIN Documents_with_expenses AS T2 ON T1.document_id = T2.document_id WHERE T1.document_name LIKE '%s%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the ids of documents that have expenses and contain the letter s in their names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6463, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many documents do not have any expense?", "output": "SELECT count(*) FROM Documents WHERE document_id NOT IN ( SELECT document_id FROM Documents_with_expenses )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many documents do not have any expense?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6464, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of documents that do not have expenses.", "output": "SELECT count(*) FROM Documents WHERE document_id NOT IN ( SELECT document_id FROM Documents_with_expenses )", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of documents that do not have expenses.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6465, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the dates for the documents with both 'GV' type and 'SF' type expenses?", "output": "SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'GV' INTERSECT SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'SF'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the dates for the documents with both 'GV' type and 'SF' type expenses?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6466, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the dates of creation for documents that have both budget type codes 'GV' and 'SF'.", "output": "SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'GV' INTERSECT SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'SF'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give the dates of creation for documents that have both budget type codes 'GV' and 'SF'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6467, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the account details with the largest value or with value having char '5' in it?", "output": "SELECT max(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE \"%5%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the account details with the largest value or with value having char '5' in it?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "cre_Docs_and_Epenses", "id": 6468, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the account details with the greatest value, as well as those that include the character 5.", "output": "SELECT max(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE \"%5%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the account details with the greatest value, as well as those that include the character 5.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6469, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total number of scientists.", "output": "SELECT count(*) FROM scientists", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the total number of scientists.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6470, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many scientists are there?", "output": "SELECT count(*) FROM scientists", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: How many scientists are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6471, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total hours of all projects.", "output": "SELECT sum(hours) FROM projects", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the total hours of all projects.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6472, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of hours for all projects?", "output": "SELECT sum(hours) FROM projects", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What is the total number of hours for all projects?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6473, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different scientists are assigned to any project?", "output": "SELECT count(DISTINCT scientist) FROM assignedto", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: How many different scientists are assigned to any project?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6474, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different scientists assigned to any project.", "output": "SELECT count(DISTINCT scientist) FROM assignedto", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Count the number of different scientists assigned to any project.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6475, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of distinct projects.", "output": "SELECT count(DISTINCT name) FROM projects", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the number of distinct projects.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6476, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different projects are there?", "output": "SELECT count(DISTINCT name) FROM projects", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: How many different projects are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6477, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average hours of all projects.", "output": "SELECT avg(hours) FROM projects", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the average hours of all projects.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6478, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average hours across all projects?", "output": "SELECT avg(hours) FROM projects", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What is the average hours across all projects?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6479, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of project that continues for the longest time.", "output": "SELECT name FROM projects ORDER BY hours DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the name of project that continues for the longest time.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6480, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the project with the most hours?", "output": "SELECT name FROM projects ORDER BY hours DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What is the name of the project with the most hours?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6481, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of all projects that are operated longer than the average working hours of all projects.", "output": "SELECT name FROM projects WHERE hours > (SELECT avg(hours) FROM projects)", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: List the name of all projects that are operated longer than the average working hours of all projects.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6482, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of projects that have taken longer than the average number of hours for all projects?", "output": "SELECT name FROM projects WHERE hours > (SELECT avg(hours) FROM projects)", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What are the names of projects that have taken longer than the average number of hours for all projects?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6483, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and hours of project that has the most number of scientists.", "output": "SELECT T1.name , T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the name and hours of project that has the most number of scientists.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6484, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and hours for the project which has the most scientists assigned to it?", "output": "SELECT T1.name , T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What is the name and hours for the project which has the most scientists assigned to it?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6485, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the project for which a scientist whose name contains \u2018Smith\u2019 is assigned to.", "output": "SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name LIKE '%Smith%'", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the name of the project for which a scientist whose name contains \u2018Smith\u2019 is assigned to.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6486, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the project that has a scientist assigned to it whose name contains 'Smith'?", "output": "SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name LIKE '%Smith%'", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What is the name of the project that has a scientist assigned to it whose name contains 'Smith'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6487, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to.", "output": "SELECT sum(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith'", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6488, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to?", "output": "SELECT sum(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith'", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6489, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of projects that require between 100 and 300 hours of work.", "output": "SELECT name FROM projects WHERE hours BETWEEN 100 AND 300", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the name of projects that require between 100 and 300 hours of work.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6490, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of projects that require between 100 and 300 hours?", "output": "SELECT name FROM projects WHERE hours BETWEEN 100 AND 300", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What are the names of projects that require between 100 and 300 hours?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6491, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'.", "output": "SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Puzzling Parallax'", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6492, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of any scientists who worked on projects named 'Matter of Time' and 'A Puzzling Pattern'?", "output": "SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Puzzling Parallax'", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What are the names of any scientists who worked on projects named 'Matter of Time' and 'A Puzzling Pattern'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6493, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all scientists sorted in alphabetical order.", "output": "SELECT name FROM scientists ORDER BY name", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: List the names of all scientists sorted in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6494, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all the scientists in alphabetical order?", "output": "SELECT name FROM scientists ORDER BY name", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What are the names of all the scientists in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6495, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of scientists involved for each project name.", "output": "SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the number of scientists involved for each project name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6496, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the naems of all the projects, and how many scientists were assigned to each of them?", "output": "SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What are the naems of all the projects, and how many scientists were assigned to each of them?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6497, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of scientists involved for the projects that require more than 300 hours.", "output": "SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours > 300 GROUP BY T1.name", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the number of scientists involved for the projects that require more than 300 hours.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6498, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of projects that require more than 300 hours, and how many scientists are assigned to each?", "output": "SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours > 300 GROUP BY T1.name", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What are the names of projects that require more than 300 hours, and how many scientists are assigned to each?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6499, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of projects which each scientist is working on and scientist's name.", "output": "SELECT count(*) , T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the number of projects which each scientist is working on and scientist's name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6500, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the scientists, and how many projects are each of them working on?", "output": "SELECT count(*) , T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What are the names of the scientists, and how many projects are each of them working on?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6501, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the SSN and name of scientists who are assigned to the project with the longest hours.", "output": "SELECT T3.ssn , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the SSN and name of scientists who are assigned to the project with the longest hours.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6502, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the SSN and names of scientists working on the project with the most hours?", "output": "SELECT T3.ssn , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What are the SSN and names of scientists working on the project with the most hours?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6503, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of scientists who are assigned to some project.", "output": "SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the name of scientists who are assigned to some project.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6504, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of scientists who are assigned to any project?", "output": "SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What are the names of scientists who are assigned to any project?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6505, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Select the project names which are not assigned yet.", "output": "SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo)", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Select the project names which are not assigned yet.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6506, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of projects that have not been assigned?", "output": "SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo)", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What are the names of projects that have not been assigned?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6507, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of scientists who are not assigned to any project.", "output": "SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the name of scientists who are not assigned to any project.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6508, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of scientists who have not been assigned a project?", "output": "SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What are the names of scientists who have not been assigned a project?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6509, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of scientists who are not assigned to any project.", "output": "SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the number of scientists who are not assigned to any project.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6510, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many scientists do not have any projects assigned to them?", "output": "SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: How many scientists do not have any projects assigned to them?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6511, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of scientists who are not working on the project with the highest hours.", "output": "SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find the names of scientists who are not working on the project with the highest hours.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6512, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of scientists who are not working on the project with the most hours?", "output": "SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects)", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What are the names of scientists who are not working on the project with the most hours?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6513, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T1.Name , T3.Name , T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name , T1.Name", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6514, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T1.Name , T3.Name , T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name , T1.Name", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6515, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it.", "output": "SELECT T2.name , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT min(hours) FROM projects)", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "scientist_1", "id": 6516, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the project that requires the fewest number of hours, and the names of the scientists assigned to it?", "output": "SELECT T2.name , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT min(hours) FROM projects)", "input": "Based on \n# the table&column(database schema) information {'Scientists': ['SSN', 'Name'], 'Projects': ['Code', 'Name', 'Hours'], 'AssignedTo': ['Scientist', 'Project']} and \n# the user question: What is the name of the project that requires the fewest number of hours, and the names of the scientists assigned to it?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6517, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the highest rated wine?", "output": "SELECT Name FROM WINE ORDER BY Score LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What is the name of the highest rated wine?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6518, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the name of the wine with the highest score.", "output": "SELECT Name FROM WINE ORDER BY Score LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Give the name of the wine with the highest score.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6519, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which winery is the wine that has the highest score from?", "output": "SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Which winery is the wine that has the highest score from?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6520, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the winery at which the wine with the highest score was made?", "output": "SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What is the winery at which the wine with the highest score was made?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6521, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all wines produced in 2008.", "output": "SELECT Name FROM WINE WHERE YEAR = \"2008\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Find the names of all wines produced in 2008.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6522, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all wines produced in 2008?", "output": "SELECT Name FROM WINE WHERE YEAR = \"2008\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the names of all wines produced in 2008?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6523, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the grapes and appelations of all wines.", "output": "SELECT Grape , Appelation FROM WINE", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: List the grapes and appelations of all wines.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6524, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the grapes and appelations of each wine?", "output": "SELECT Grape , Appelation FROM WINE", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the grapes and appelations of each wine?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6525, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names and scores of all wines.", "output": "SELECT Name , Score FROM WINE", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: List the names and scores of all wines.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6526, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and scores of all wines?", "output": "SELECT Name , Score FROM WINE", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the names and scores of all wines?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6527, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the area and county of all appelations.", "output": "SELECT Area , County FROM APPELLATIONS", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: List the area and county of all appelations.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6528, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the areas and counties for all appelations?", "output": "SELECT Area , County FROM APPELLATIONS", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the areas and counties for all appelations?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6529, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the prices of wines produced before the year of 2010?", "output": "SELECT Price FROM WINE WHERE YEAR < 2010", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the prices of wines produced before the year of 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6530, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the prices of wines produced before 2010.", "output": "SELECT Price FROM WINE WHERE YEAR < 2010", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Return the prices of wines produced before 2010.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6531, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all distinct wines that have scores higher than 90.", "output": "SELECT Name FROM WINE WHERE score > 90", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: List the names of all distinct wines that have scores higher than 90.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6532, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of wines with scores higher than 90?", "output": "SELECT Name FROM WINE WHERE score > 90", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the names of wines with scores higher than 90?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6533, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all distinct wines that are made of red color grape.", "output": "SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"Red\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: List the names of all distinct wines that are made of red color grape.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6534, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of wines made from red grapes?", "output": "SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"Red\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the names of wines made from red grapes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6535, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of all distinct wines that have appellations in North Coast area.", "output": "SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = \"North Coast\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Find the names of all distinct wines that have appellations in North Coast area.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6536, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct names of wines that have appellations in the North Coast area?", "output": "SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = \"North Coast\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the distinct names of wines that have appellations in the North Coast area?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6537, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many wines are produced at Robert Biale winery?", "output": "SELECT count(*) FROM WINE WHERE Winery = \"Robert Biale\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: How many wines are produced at Robert Biale winery?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6538, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of wines produced at Robert Biale winery.", "output": "SELECT count(*) FROM WINE WHERE Winery = \"Robert Biale\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Count the number of wines produced at Robert Biale winery.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6539, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many appelations are in Napa Country?", "output": "SELECT count(*) FROM APPELLATIONS WHERE County = \"Napa\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: How many appelations are in Napa Country?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6540, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of appelations in Napa County.", "output": "SELECT count(*) FROM APPELLATIONS WHERE County = \"Napa\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Count the number of appelations in Napa County.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6541, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the average prices of wines that are produced by appelations in Sonoma County.", "output": "SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = \"Sonoma\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Give me the average prices of wines that are produced by appelations in Sonoma County.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6542, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average price of wines produced in appelations in Sonoma County?", "output": "SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = \"Sonoma\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What is the average price of wines produced in appelations in Sonoma County?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6543, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and scores of wines that are made of white color grapes?", "output": "SELECT T2.Name , T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"White\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the names and scores of wines that are made of white color grapes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6544, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the names and scores of wines made from white grapes.", "output": "SELECT T2.Name , T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"White\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Give the names and scores of wines made from white grapes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6545, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the maximum price of wins from the appelations in Central Coast area and produced before the year of 2005.", "output": "SELECT max(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = \"Central Coast\" AND T2.year < 2005", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Find the maximum price of wins from the appelations in Central Coast area and produced before the year of 2005.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6546, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum price of wines from the appelation in the Central Coast area, which was produced before 2005?", "output": "SELECT max(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = \"Central Coast\" AND T2.year < 2005", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What is the maximum price of wines from the appelation in the Central Coast area, which was produced before 2005?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6547, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the the grape whose white color grapes are used to produce wines with scores higher than 90.", "output": "SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"White\" AND T2.score > 90", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Find the the grape whose white color grapes are used to produce wines with scores higher than 90.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6548, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the white grape used to produce wines with scores above 90.", "output": "SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"White\" AND T2.score > 90", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Find the white grape used to produce wines with scores above 90.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6549, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the wines that have prices higher than 50 and made of Red color grapes?", "output": "SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"Red\" AND T2.price > 50", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the wines that have prices higher than 50 and made of Red color grapes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6550, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of wines made from red grapes and with prices above 50?", "output": "SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = \"Red\" AND T2.price > 50", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the names of wines made from red grapes and with prices above 50?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6551, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the wines that have prices lower than 50 and have appelations in Monterey county?", "output": "SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = \"Monterey\" AND T2.price < 50", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the wines that have prices lower than 50 and have appelations in Monterey county?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6552, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the neames of wines with prices below 50 and with appelations in Monterey county.", "output": "SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = \"Monterey\" AND T2.price < 50", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Give the neames of wines with prices below 50 and with appelations in Monterey county.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6553, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the numbers of wines for different grapes?", "output": "SELECT count(*) , Grape FROM WINE GROUP BY Grape", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the numbers of wines for different grapes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6554, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many wines are there for each grape?", "output": "SELECT count(*) , Grape FROM WINE GROUP BY Grape", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: How many wines are there for each grape?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6555, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average prices of wines for different years?", "output": "SELECT avg(Price) , YEAR FROM WINE GROUP BY YEAR", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the average prices of wines for different years?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6556, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average prices of wines for each each?", "output": "SELECT avg(Price) , YEAR FROM WINE GROUP BY YEAR", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What is the average prices of wines for each each?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6557, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct names of all wines that have prices higher than some wines from John Anthony winery.", "output": "SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT min(Price) FROM wine WHERE Winery = \"John Anthony\")", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Find the distinct names of all wines that have prices higher than some wines from John Anthony winery.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6558, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct names of wines with prices higher than any wine from John Anthony winery.", "output": "SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT min(Price) FROM wine WHERE Winery = \"John Anthony\")", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the distinct names of wines with prices higher than any wine from John Anthony winery.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6559, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all distinct wines in alphabetical order.", "output": "SELECT DISTINCT Name FROM WINE ORDER BY Name", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: List the names of all distinct wines in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6560, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of wines, sorted in alphabetical order?", "output": "SELECT DISTINCT Name FROM WINE ORDER BY Name", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the names of wines, sorted in alphabetical order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6561, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all distinct wines ordered by price.", "output": "SELECT DISTINCT Name FROM WINE ORDER BY price", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: List the names of all distinct wines ordered by price.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6562, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of wines, sorted by price ascending?", "output": "SELECT DISTINCT Name FROM WINE ORDER BY price", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the names of wines, sorted by price ascending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6563, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the area of the appelation that produces the highest number of wines before the year of 2010?", "output": "SELECT T1.Area FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING T2.year < 2010 ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What is the area of the appelation that produces the highest number of wines before the year of 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6564, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the area for the appelation which produced the most wines prior to 2010?", "output": "SELECT T1.Area FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING T2.year < 2010 ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What is the area for the appelation which produced the most wines prior to 2010?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6565, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the color of the grape whose wine products has the highest average price?", "output": "SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What is the color of the grape whose wine products has the highest average price?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6566, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the color of the grape whose wine products have the highest average price?", "output": "SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Give the color of the grape whose wine products have the highest average price?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6567, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct names of wines produced before the year of 2000 or after the year of 2010.", "output": "SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Find the distinct names of wines produced before the year of 2000 or after the year of 2010.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6568, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the distinct names of wines made before 2000 or after 2010.", "output": "SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Give the distinct names of wines made before 2000 or after 2010.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6569, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct winery of wines having price between 50 and 100.", "output": "SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Find the distinct winery of wines having price between 50 and 100.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6570, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct wineries which produce wines costing between 50 and 100?", "output": "SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the distinct wineries which produce wines costing between 50 and 100?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6571, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape?", "output": "SELECT AVG(Price) , AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = \"Zinfandel\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6572, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the average price and case of wines made from Zinfandel grapes in the year 2009.", "output": "SELECT AVG(Price) , AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = \"Zinfandel\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Give the average price and case of wines made from Zinfandel grapes in the year 2009.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6573, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum price and score of wines produced by St. Helena appelation?", "output": "SELECT max(Price) , max(Score) FROM WINE WHERE Appelation = \"St. Helena\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the maximum price and score of wines produced by St. Helena appelation?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6574, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the maximum price and score for wines produced in the appelation St. Helena.", "output": "SELECT max(Price) , max(Score) FROM WINE WHERE Appelation = \"St. Helena\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Give the maximum price and score for wines produced in the appelation St. Helena.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6575, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum price and score of wines in each year?", "output": "SELECT max(Price) , max(Score) , YEAR FROM WINE GROUP BY YEAR", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the maximum price and score of wines in each year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6576, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the maximum price and score of wines for each year?", "output": "SELECT max(Price) , max(Score) , YEAR FROM WINE GROUP BY YEAR", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the maximum price and score of wines for each year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6577, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average price and score of wines grouped by appelation?", "output": "SELECT avg(Price) , avg(Score) , Appelation FROM WINE GROUP BY Appelation", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the average price and score of wines grouped by appelation?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6578, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the average price and score of wines for each appelation?", "output": "SELECT avg(Price) , avg(Score) , Appelation FROM WINE GROUP BY Appelation", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the average price and score of wines for each appelation?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6579, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the wineries that have at least four wines.", "output": "SELECT Winery FROM WINE GROUP BY Winery HAVING count(*) >= 4", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Find the wineries that have at least four wines.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6580, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which wineries produce at least four wines?", "output": "SELECT Winery FROM WINE GROUP BY Winery HAVING count(*) >= 4", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Which wineries produce at least four wines?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6581, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the country of all appelations who have at most three wines.", "output": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING count(*) <= 3", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Find the country of all appelations who have at most three wines.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6582, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the countries for appelations with at most 3 wines?", "output": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING count(*) <= 3", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the countries for appelations with at most 3 wines?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6583, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of wines whose production year are before the year of all wines by Brander winery?", "output": "SELECT Name FROM WINE WHERE YEAR < (SELECT min(YEAR) FROM WINE WHERE Winery = \"Brander\")", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the names of wines whose production year are before the year of all wines by Brander winery?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6584, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of wines produced before any wine from the Brander winery?", "output": "SELECT Name FROM WINE WHERE YEAR < (SELECT min(YEAR) FROM WINE WHERE Winery = \"Brander\")", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the names of wines produced before any wine from the Brander winery?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6585, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of wines that are more expensive then all wines made in the year 2006?", "output": "SELECT Name FROM WINE WHERE Price > (SELECT max(Price) FROM WINE WHERE YEAR = 2006)", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the names of wines that are more expensive then all wines made in the year 2006?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6586, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give the names of wines with prices above any wine produced in 2006.", "output": "SELECT Name FROM WINE WHERE Price > (SELECT max(Price) FROM WINE WHERE YEAR = 2006)", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Give the names of wines with prices above any wine produced in 2006.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6587, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the top 3 wineries with the greatest number of wines made of white color grapes.", "output": "SELECT T2.Winery FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.GRAPE = T2.GRAPE WHERE T1.Color = \"White\" GROUP BY T2.Winery ORDER BY count(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Find the top 3 wineries with the greatest number of wines made of white color grapes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6588, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which 3 wineries produce the most wines made from white grapes?", "output": "SELECT T2.Winery FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.GRAPE = T2.GRAPE WHERE T1.Color = \"White\" GROUP BY T2.Winery ORDER BY count(*) DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Which 3 wineries produce the most wines made from white grapes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6589, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the grape, winery and year of the wines whose price is bigger than 100 ordered by year.", "output": "SELECT Grape , Winery , YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: List the grape, winery and year of the wines whose price is bigger than 100 ordered by year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6590, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the grapes, wineries and years for wines with price higher than 100, sorted by year?", "output": "SELECT Grape , Winery , YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the grapes, wineries and years for wines with price higher than 100, sorted by year?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6591, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the grape, appelation and name of wines whose score is higher than 93 ordered by Name.", "output": "SELECT Grape , Appelation , Name FROM WINE WHERE Score > 93 ORDER BY Name", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: List the grape, appelation and name of wines whose score is higher than 93 ordered by Name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6592, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the grapes, appelations, and wines with scores above 93, sorted by Name?", "output": "SELECT Grape , Appelation , Name FROM WINE WHERE Score > 93 ORDER BY Name", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the grapes, appelations, and wines with scores above 93, sorted by Name?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6593, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the appelations that produce wines after the year of 2008 but not in Central Coast area.", "output": "SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = \"Central Coast\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Find the appelations that produce wines after the year of 2008 but not in Central Coast area.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6594, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the appelations for wines produced after 2008 but not in the Central Coast area?", "output": "SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = \"Central Coast\"", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What are the appelations for wines produced after 2008 but not in the Central Coast area?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6595, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average price of wines that are not produced from Sonoma county.", "output": "SELECT avg(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma')", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Find the average price of wines that are not produced from Sonoma county.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6596, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average price for wines not produced in Sonoma county?", "output": "SELECT avg(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma')", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What is the average price for wines not produced in Sonoma county?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6597, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the county where produces the most number of wines with score higher than 90.", "output": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T2.Score > 90 GROUP BY T1.County ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: Find the county where produces the most number of wines with score higher than 90.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "wine_1", "id": 6598, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the county that produces the most wines scoring higher than 90?", "output": "SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T2.Score > 90 GROUP BY T1.County ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'grapes': ['ID', 'Grape', 'Color'], 'appellations': ['No', 'Appelation', 'County', 'State', 'Area', 'isAVA'], 'wine': ['No', 'Grape', 'Winery', 'Appelation', 'State', 'Name', 'Year', 'Price', 'Score', 'Cases', 'Drink']} and \n# the user question: What is the county that produces the most wines scoring higher than 90?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6599, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many train stations are there?", "output": "SELECT count(*) FROM station", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many train stations are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6600, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name, location, and number of platforms for all stations.", "output": "SELECT name , LOCATION , number_of_platforms FROM station", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name, location, and number of platforms for all stations.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6601, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all locations of train stations?", "output": "SELECT DISTINCT LOCATION FROM station", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all locations of train stations?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6602, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names and total passengers for all train stations not in London.", "output": "SELECT name , total_passengers FROM station WHERE LOCATION != 'London'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names and total passengers for all train stations not in London.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6603, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names and main services for train stations that have the top three total number of passengers.", "output": "SELECT name , main_services FROM station ORDER BY total_passengers DESC LIMIT 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names and main services for train stations that have the top three total number of passengers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6604, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average and maximum number of total passengers for train stations in London or Glasgow?", "output": "SELECT avg(total_passengers) , max(total_passengers) FROM station WHERE LOCATION = 'London' OR LOCATION = 'Glasgow'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average and maximum number of total passengers for train stations in London or Glasgow?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6605, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all locations and the total number of platforms and passengers for all train stations in each location.", "output": "SELECT LOCATION , sum(number_of_platforms) , sum(total_passengers) FROM station GROUP BY LOCATION", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all locations and the total number of platforms and passengers for all train stations in each location.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6606, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers.", "output": "SELECT DISTINCT LOCATION FROM station WHERE number_of_platforms >= 15 AND total_passengers > 25", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6607, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all locations which don't have a train station with at least 15 platforms.", "output": "SELECT LOCATION FROM station EXCEPT SELECT LOCATION FROM station WHERE number_of_platforms >= 15", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all locations which don't have a train station with at least 15 platforms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6608, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the location with most number of train stations.", "output": "SELECT LOCATION FROM station GROUP BY LOCATION ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the location with most number of train stations.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6609, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name, time, and service for all trains.", "output": "SELECT name , TIME , service FROM train", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name, time, and service for all trains.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6610, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of trains", "output": "SELECT count(*) FROM train", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of trains,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6611, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the name and service for all trains in order by time.", "output": "SELECT name , service FROM train ORDER BY TIME", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the name and service for all trains in order by time.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6612, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the station name and number of trains in each station.", "output": "SELECT T2.name , count(*) FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the station name and number of trains in each station.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6613, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "show the train name and station name for each train.", "output": "SELECT T2.name , T3.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: show the train name and station name for each train.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6614, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all train names and times in stations in London in descending order by train time.", "output": "SELECT T3.name , T3.time FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T2.location = 'London' ORDER BY T3.time DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all train names and times in stations in London in descending order by train time.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6615, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the station name with greatest number of trains.", "output": "SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the station name with greatest number of trains.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6616, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the station name with at least two trains.", "output": "SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the station name with at least two trains.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6617, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all locations with only 1 station.", "output": "SELECT LOCATION FROM station GROUP BY LOCATION HAVING count(*) = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all locations with only 1 station.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6618, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show station names without any trains.", "output": "SELECT name FROM station WHERE station_id NOT IN (SELECT station_id FROM train_station)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show station names without any trains.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6619, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the stations which serve both \"Ananthapuri Express\" and \"Guruvayur Express\" trains?", "output": "SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T3.Name = \"Ananthapuri Express\" INTERSECT SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id JOIN train AS T3 ON T3.train_id = T1.train_id WHERE T3.Name = \"Guruvayur Express\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the stations which serve both \"Ananthapuri Express\" and \"Guruvayur Express\" trains?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6620, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the trains that do not pass any station located in London.", "output": "SELECT T2.name FROM train_station AS T1 JOIN train AS T2 ON T1.train_id = T2.train_id WHERE T1.station_id NOT IN (SELECT T4.station_id FROM train_station AS T3 JOIN station AS T4 ON T3.station_id = T4.station_id WHERE t4.location = \"London\")", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the trains that do not pass any station located in London.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "train_station", "id": 6621, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names and locations of all stations ordered by their yearly entry exit and interchange amounts.", "output": "SELECT name , LOCATION FROM station ORDER BY Annual_entry_exit , Annual_interchanges", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names and locations of all stations ordered by their yearly entry exit and interchange amounts.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6622, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all vehicle id", "output": "SELECT vehicle_id FROM Vehicles;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all vehicle id,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6623, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of all vehicles?", "output": "SELECT vehicle_id FROM Vehicles;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of all vehicles?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6624, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many vehicle in total?", "output": "SELECT count(*) FROM Vehicles;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many vehicle in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6625, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many vehicles exist?", "output": "SELECT count(*) FROM Vehicles;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many vehicles exist?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6626, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the detail of vehicle with id 1.", "output": "SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the detail of vehicle with id 1.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6627, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the details of the car with id 1?", "output": "SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the details of the car with id 1?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6628, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the first name middle name and last name of all staff.", "output": "SELECT first_name , middle_name , last_name FROM Staff;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the first name middle name and last name of all staff.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6629, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first, middle, and last names of all staff?", "output": "SELECT first_name , middle_name , last_name FROM Staff;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first, middle, and last names of all staff?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6630, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the birthday of the staff member with first name as Janessa and last name as Sawayn?", "output": "SELECT date_of_birth FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the birthday of the staff member with first name as Janessa and last name as Sawayn?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6631, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the date of birth for the staff member named Janessa Sawayn?", "output": "SELECT date_of_birth FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the date of birth for the staff member named Janessa Sawayn?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6632, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When did the staff member with first name as Janessa and last name as Sawayn join the company?", "output": "SELECT date_joined_staff FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When did the staff member with first name as Janessa and last name as Sawayn join the company?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6633, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When did the staff member named Janessa Sawayn join the company?", "output": "SELECT date_joined_staff FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When did the staff member named Janessa Sawayn join the company?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6634, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When did the staff member with first name as Janessa and last name as Sawayn leave the company?", "output": "SELECT date_left_staff FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When did the staff member with first name as Janessa and last name as Sawayn leave the company?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6635, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When did the staff member Janessa Sawayn leave the company?", "output": "SELECT date_left_staff FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When did the staff member Janessa Sawayn leave the company?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6636, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many staff have the first name Ludie?", "output": "SELECT count(*) FROM Staff WHERE first_name = \"Ludie\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many staff have the first name Ludie?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6637, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many employees have a first name of Ludie?", "output": "SELECT count(*) FROM Staff WHERE first_name = \"Ludie\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many employees have a first name of Ludie?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6638, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the nickname of staff with first name as Janessa and last name as Sawayn?", "output": "SELECT nickname FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the nickname of staff with first name as Janessa and last name as Sawayn?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6639, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the nickname of the employee named Janessa Sawayn?", "output": "SELECT nickname FROM Staff WHERE first_name = \"Janessa\" AND last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the nickname of the employee named Janessa Sawayn?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6640, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many staff in total?", "output": "SELECT count(*) FROM Staff;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many staff in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6641, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many employees are there?", "output": "SELECT count(*) FROM Staff;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many employees are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6642, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which city does staff with first name as Janessa and last name as Sawayn live?", "output": "SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which city does staff with first name as Janessa and last name as Sawayn live?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6643, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In what city does Janessa Sawayn live?", "output": "SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: In what city does Janessa Sawayn live?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6644, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which country and state does staff with first name as Janessa and last name as Sawayn lived?", "output": "SELECT T1.country , T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which country and state does staff with first name as Janessa and last name as Sawayn lived?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6645, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In which country and state does Janessa Sawayn live?", "output": "SELECT T1.country , T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: In which country and state does Janessa Sawayn live?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6646, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin?", "output": "SELECT sum(T1.lesson_time) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Rylan\" AND T2.last_name = \"Goodwin\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6647, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How long is the total lesson time took by the customer named Rylan Goodwin?", "output": "SELECT sum(T1.lesson_time) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Rylan\" AND T2.last_name = \"Goodwin\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How long is the total lesson time took by the customer named Rylan Goodwin?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6648, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the zip code of staff with first name as Janessa and last name as Sawayn lived?", "output": "SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the zip code of staff with first name as Janessa and last name as Sawayn lived?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6649, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the zip code of the hosue of the employee named Janessa Sawayn?", "output": "SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the zip code of the hosue of the employee named Janessa Sawayn?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6650, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many staff live in state Georgia?", "output": "SELECT count(*) FROM Addresses WHERE state_province_county = \"Georgia\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many staff live in state Georgia?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6651, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many employees live in Georgia?", "output": "SELECT count(*) FROM Addresses WHERE state_province_county = \"Georgia\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many employees live in Georgia?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6652, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find out the first name and last name of staff lived in city Damianfort.", "output": "SELECT T2.first_name , T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = \"Damianfort\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find out the first name and last name of staff lived in city Damianfort.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6653, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first and last name of all employees who live in the city Damianfort?", "output": "SELECT T2.first_name , T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = \"Damianfort\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first and last name of all employees who live in the city Damianfort?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6654, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which city lives most of staffs? List the city name and number of staffs.", "output": "SELECT T1.city , count(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY count(*) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which city lives most of staffs? List the city name and number of staffs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6655, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In which city do the most employees live and how many of them live there?", "output": "SELECT T1.city , count(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY count(*) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: In which city do the most employees live and how many of them live there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6656, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the states which have between 2 to 4 staffs living there.", "output": "SELECT T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.state_province_county HAVING count(*) BETWEEN 2 AND 4;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the states which have between 2 to 4 staffs living there.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6657, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the states that have 2 to 4 employees living there?", "output": "SELECT T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.state_province_county HAVING count(*) BETWEEN 2 AND 4;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the states that have 2 to 4 employees living there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6658, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the first name and last name of all customers.", "output": "SELECT first_name , last_name FROM Customers;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the first name and last name of all customers.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6659, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names for all customers?", "output": "SELECT first_name , last_name FROM Customers;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last names for all customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6660, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List email address and birthday of customer whose first name as Carole.", "output": "SELECT email_address , date_of_birth FROM Customers WHERE first_name = \"Carole\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List email address and birthday of customer whose first name as Carole.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6661, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the email addresses and date of births for all customers who have a first name of Carole?", "output": "SELECT email_address , date_of_birth FROM Customers WHERE first_name = \"Carole\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the email addresses and date of births for all customers who have a first name of Carole?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6662, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List phone number and email address of customer with more than 2000 outstanding balance.", "output": "SELECT phone_number , email_address FROM Customers WHERE amount_outstanding > 2000;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List phone number and email address of customer with more than 2000 outstanding balance.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6663, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the phone numbers and email addresses of all customers who have an outstanding balance of more than 2000?", "output": "SELECT phone_number , email_address FROM Customers WHERE amount_outstanding > 2000;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the phone numbers and email addresses of all customers who have an outstanding balance of more than 2000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6664, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the status code, mobile phone number and email address of customer with last name as Kohler or first name as Marina?", "output": "SELECT customer_status_code , cell_mobile_phone_number , email_address FROM Customers WHERE first_name = \"Marina\" OR last_name = \"Kohler\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the status code, mobile phone number and email address of customer with last name as Kohler or first name as Marina?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6665, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the status code, phone number, and email address of the customer whose last name is Kohler or whose first name is Marina?", "output": "SELECT customer_status_code , cell_mobile_phone_number , email_address FROM Customers WHERE first_name = \"Marina\" OR last_name = \"Kohler\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the status code, phone number, and email address of the customer whose last name is Kohler or whose first name is Marina?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6666, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When are the birthdays of customer who are classified as 'Good Customer' status?", "output": "SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When are the birthdays of customer who are classified as 'Good Customer' status?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6667, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the date of birth of every customer whose status code is 'Good Customer'?", "output": "SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the date of birth of every customer whose status code is 'Good Customer'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6668, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When did customer with first name as Carole and last name as Bernhard became a customer?", "output": "SELECT date_became_customer FROM Customers WHERE first_name = \"Carole\" AND last_name = \"Bernhard\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When did customer with first name as Carole and last name as Bernhard became a customer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6669, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When did Carole Bernhard first become a customer?", "output": "SELECT date_became_customer FROM Customers WHERE first_name = \"Carole\" AND last_name = \"Bernhard\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When did Carole Bernhard first become a customer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6670, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers in total?", "output": "SELECT count(*) FROM Customers;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers in total?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6671, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers are there?", "output": "SELECT count(*) FROM Customers;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6672, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all customer status codes and the number of customers having each status code.", "output": "SELECT customer_status_code , count(*) FROM Customers GROUP BY customer_status_code;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all customer status codes and the number of customers having each status code.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6673, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each customer status code, how many customers are classified that way?", "output": "SELECT customer_status_code , count(*) FROM Customers GROUP BY customer_status_code;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each customer status code, how many customers are classified that way?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6674, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customer status code has least number of customers?", "output": "SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY count(*) ASC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customer status code has least number of customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6675, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the status code with the least number of customers?", "output": "SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY count(*) ASC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the status code with the least number of customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6676, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed?", "output": "SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Rylan\" AND T2.last_name = \"Goodwin\" AND T1.lesson_status_code = \"Completed\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6677, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many lessons did the customer Ryan Goodwin complete?", "output": "SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Rylan\" AND T2.last_name = \"Goodwin\" AND T1.lesson_status_code = \"Completed\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many lessons did the customer Ryan Goodwin complete?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6678, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is maximum, minimum and average amount of outstanding of customer?", "output": "SELECT max(amount_outstanding) , min(amount_outstanding) , avg(amount_outstanding) FROM Customers;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is maximum, minimum and average amount of outstanding of customer?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6679, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum, minimum, and average amount of money outsanding for all customers?", "output": "SELECT max(amount_outstanding) , min(amount_outstanding) , avg(amount_outstanding) FROM Customers;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the maximum, minimum, and average amount of money outsanding for all customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6680, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the first name and last name of customers have the amount of outstanding between 1000 and 3000.", "output": "SELECT first_name , last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the first name and last name of customers have the amount of outstanding between 1000 and 3000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6681, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of all customers with between 1000 and 3000 dollars outstanding?", "output": "SELECT first_name , last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last names of all customers with between 1000 and 3000 dollars outstanding?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6682, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List first name and last name of customers lived in city Lockmanfurt.", "output": "SELECT T1.first_name , T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = \"Lockmanfurt\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List first name and last name of customers lived in city Lockmanfurt.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6683, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of all customers who lived in Lockmanfurt?", "output": "SELECT T1.first_name , T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = \"Lockmanfurt\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last names of all customers who lived in Lockmanfurt?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6684, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which country does customer with first name as Carole and last name as Bernhard lived in?", "output": "SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = \"Carole\" AND T1.last_name = \"Bernhard\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which country does customer with first name as Carole and last name as Bernhard lived in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6685, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the country in which the customer Carole Bernhard lived?", "output": "SELECT T2.country FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = \"Carole\" AND T1.last_name = \"Bernhard\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the country in which the customer Carole Bernhard lived?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6686, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is zip code of customer with first name as Carole and last name as Bernhard?", "output": "SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = \"Carole\" AND T1.last_name = \"Bernhard\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is zip code of customer with first name as Carole and last name as Bernhard?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6687, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the zip code of the customer Carole Bernhard?", "output": "SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = \"Carole\" AND T1.last_name = \"Bernhard\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the zip code of the customer Carole Bernhard?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6688, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which city does has most number of customers?", "output": "SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which city does has most number of customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6689, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the city with the most customers?", "output": "SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the city with the most customers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6690, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How much in total does customer with first name as Carole and last name as Bernhard paid?", "output": "SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Carole\" AND T2.last_name = \"Bernhard\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How much in total does customer with first name as Carole and last name as Bernhard paid?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6691, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total amount of moeny paid by the customer Carole Bernhard?", "output": "SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Carole\" AND T2.last_name = \"Bernhard\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total amount of moeny paid by the customer Carole Bernhard?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6692, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the number of customers that did not have any payment history.", "output": "SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments );", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the number of customers that did not have any payment history.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6693, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many customers have no payment histories?", "output": "SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments );", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many customers have no payment histories?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6694, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List first name and last name of customers that have more than 2 payments.", "output": "SELECT T2.first_name , T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) > 2;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List first name and last name of customers that have more than 2 payments.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6695, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last names of all customers with more than 2 payments?", "output": "SELECT T2.first_name , T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*) > 2;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last names of all customers with more than 2 payments?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6696, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all payment methods and number of payments using each payment methods.", "output": "SELECT payment_method_code , count(*) FROM Customer_Payments GROUP BY payment_method_code;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all payment methods and number of payments using each payment methods.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6697, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each payment method, how many payments were made?", "output": "SELECT payment_method_code , count(*) FROM Customer_Payments GROUP BY payment_method_code;", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each payment method, how many payments were made?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6698, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many lessons were in cancelled state?", "output": "SELECT count(*) FROM Lessons WHERE lesson_status_code = \"Cancelled\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many lessons were in cancelled state?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6699, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many lessons have been cancelled?", "output": "SELECT count(*) FROM Lessons WHERE lesson_status_code = \"Cancelled\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many lessons have been cancelled?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6700, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List lesson id of all lessons taught by staff with first name as Janessa, last name as Sawayn and nickname containing letter 's'.", "output": "SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\" AND nickname LIKE \"%s%\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List lesson id of all lessons taught by staff with first name as Janessa, last name as Sawayn and nickname containing letter 's'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6701, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the the lesson ids of all staff taught by Janessa Sawayn whose nickname has the letter s?", "output": "SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\" AND nickname LIKE \"%s%\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the the lesson ids of all staff taught by Janessa Sawayn whose nickname has the letter s?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6702, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many lessons taught by staff whose first name has letter 'a' in it?", "output": "SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE \"%a%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many lessons taught by staff whose first name has letter 'a' in it?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6703, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many lessons were taught by a staff member whose first name has the letter 'a' in it?", "output": "SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE \"%a%\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many lessons were taught by a staff member whose first name has the letter 'a' in it?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6704, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn?", "output": "SELECT sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6705, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total time for all lessons taught by Janessa Sawayn?", "output": "SELECT sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total time for all lessons taught by Janessa Sawayn?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6706, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is average lesson price taught by staff with first name as Janessa and last name as Sawayn?", "output": "SELECT avg(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is average lesson price taught by staff with first name as Janessa and last name as Sawayn?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6707, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average price for a lesson taught by Janessa Sawayn?", "output": "SELECT avg(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = \"Janessa\" AND T2.last_name = \"Sawayn\";", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average price for a lesson taught by Janessa Sawayn?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6708, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many lesson does customer with first name Ray took?", "output": "SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Ray\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many lesson does customer with first name Ray took?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6709, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many lessons did the customer with the first name Ray take?", "output": "SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = \"Ray\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many lessons did the customer with the first name Ray take?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6710, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which last names are both used by customers and by staff?", "output": "SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which last names are both used by customers and by staff?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6711, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the last names that are used by customers and staff?", "output": "SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the last names that are used by customers and staff?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6712, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name of the staff who did not give any lesson?", "output": "SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name of the staff who did not give any lesson?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6713, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first name of all employees who do not give any lessons?", "output": "SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first name of all employees who do not give any lessons?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "driving_school", "id": 6714, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id and detail of the vehicle used in lessons for most of the times?", "output": "SELECT T1.vehicle_id , T1.vehicle_details FROM Vehicles AS T1 JOIN Lessons AS T2 ON T1.vehicle_id = T2.vehicle_id GROUP BY T1.vehicle_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id and detail of the vehicle used in lessons for most of the times?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6715, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many faculty do we have?", "output": "SELECT count(*) FROM Faculty", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many faculty do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6716, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of faculty members?", "output": "SELECT count(*) FROM Faculty", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of faculty members?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6717, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What ranks do we have for faculty?", "output": "SELECT DISTINCT rank FROM Faculty", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What ranks do we have for faculty?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6718, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the list of distinct ranks for faculty.", "output": "SELECT DISTINCT rank FROM Faculty", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the list of distinct ranks for faculty.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6719, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all the distinct buildings that have faculty rooms.", "output": "SELECT DISTINCT building FROM Faculty", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all the distinct buildings that have faculty rooms.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6720, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What buildings have faculty offices?", "output": "SELECT DISTINCT building FROM Faculty", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What buildings have faculty offices?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6721, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the rank, first name, and last name for all the faculty.", "output": "SELECT rank , Fname , Lname FROM Faculty", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the rank, first name, and last name for all the faculty.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6722, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the rank, first name, and last name of the faculty members?", "output": "SELECT rank , Fname , Lname FROM Faculty", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the rank, first name, and last name of the faculty members?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6723, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the first name, last name, and phone number for all female faculty members.", "output": "SELECT Fname , Lname , phone FROM Faculty WHERE Sex = 'F'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the first name, last name, and phone number for all female faculty members.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6724, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first name, last name, and phone number of all the female faculty members?", "output": "SELECT Fname , Lname , phone FROM Faculty WHERE Sex = 'F'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first name, last name, and phone number of all the female faculty members?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6725, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show ids for all the male faculty.", "output": "SELECT FacID FROM Faculty WHERE Sex = 'M'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show ids for all the male faculty.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6726, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the faculty ids of all the male faculty members?", "output": "SELECT FacID FROM Faculty WHERE Sex = 'M'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the faculty ids of all the male faculty members?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6727, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many female Professors do we have?", "output": "SELECT count(*) FROM Faculty WHERE Sex = 'F' AND Rank = \"Professor\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many female Professors do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6728, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of female Professors we have.", "output": "SELECT count(*) FROM Faculty WHERE Sex = 'F' AND Rank = \"Professor\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of female Professors we have.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6729, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the phone, room, and building for the faculty named Jerry Prince.", "output": "SELECT phone , room , building FROM Faculty WHERE Fname = \"Jerry\" AND Lname = \"Prince\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the phone, room, and building for the faculty named Jerry Prince.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6730, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the phone, room, and building of the faculty member called Jerry Prince?", "output": "SELECT phone , room , building FROM Faculty WHERE Fname = \"Jerry\" AND Lname = \"Prince\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the phone, room, and building of the faculty member called Jerry Prince?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6731, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many Professors are in building NEB?", "output": "SELECT count(*) FROM Faculty WHERE Rank = \"Professor\" AND building = \"NEB\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many Professors are in building NEB?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6732, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of Professors who have office in building NEB.", "output": "SELECT count(*) FROM Faculty WHERE Rank = \"Professor\" AND building = \"NEB\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of Professors who have office in building NEB.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6733, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the first name and last name for all the instructors.", "output": "SELECT fname , lname FROM Faculty WHERE Rank = \"Instructor\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the first name and last name for all the instructors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6734, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first name and last name of all the instructors?", "output": "SELECT fname , lname FROM Faculty WHERE Rank = \"Instructor\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first name and last name of all the instructors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6735, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all the buildings along with the number of faculty members the buildings have.", "output": "SELECT building , count(*) FROM Faculty GROUP BY building", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all the buildings along with the number of faculty members the buildings have.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6736, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many faculty members does each building have? List the result with the name of the building.", "output": "SELECT building , count(*) FROM Faculty GROUP BY building", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many faculty members does each building have? List the result with the name of the building.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6737, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which building has most faculty members?", "output": "SELECT building FROM Faculty GROUP BY building ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which building has most faculty members?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6738, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the building that has the largest number of faculty members.", "output": "SELECT building FROM Faculty GROUP BY building ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the building that has the largest number of faculty members.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6739, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all the buildings that have at least 10 professors.", "output": "SELECT building FROM Faculty WHERE rank = \"Professor\" GROUP BY building HAVING count(*) >= 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all the buildings that have at least 10 professors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6740, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In which buildings are there at least ten professors?", "output": "SELECT building FROM Faculty WHERE rank = \"Professor\" GROUP BY building HAVING count(*) >= 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: In which buildings are there at least ten professors?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6741, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each faculty rank, show the number of faculty members who have it.", "output": "SELECT rank , count(*) FROM Faculty GROUP BY rank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each faculty rank, show the number of faculty members who have it.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6742, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many faculty members do we have for each faculty rank?", "output": "SELECT rank , count(*) FROM Faculty GROUP BY rank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many faculty members do we have for each faculty rank?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6743, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all the ranks and the number of male and female faculty for each rank.", "output": "SELECT rank , sex , count(*) FROM Faculty GROUP BY rank , sex", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all the ranks and the number of male and female faculty for each rank.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6744, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many faculty members do we have for each rank and gender?", "output": "SELECT rank , sex , count(*) FROM Faculty GROUP BY rank , sex", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many faculty members do we have for each rank and gender?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6745, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which rank has the smallest number of faculty members?", "output": "SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which rank has the smallest number of faculty members?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6746, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the faculty rank that has the least members.", "output": "SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the faculty rank that has the least members.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6747, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the number of male and female assistant professors.", "output": "SELECT sex , count(*) FROM Faculty WHERE rank = \"AsstProf\" GROUP BY sex", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the number of male and female assistant professors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6748, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many male and female assistant professors do we have?", "output": "SELECT sex , count(*) FROM Faculty WHERE rank = \"AsstProf\" GROUP BY sex", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many male and female assistant professors do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6749, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first name and last name of Linda Smith's advisor?", "output": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = \"Linda\" AND T2.lname = \"Smith\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first name and last name of Linda Smith's advisor?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6750, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Who is the advisor of Linda Smith? Give me the first name and last name.", "output": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = \"Linda\" AND T2.lname = \"Smith\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Who is the advisor of Linda Smith? Give me the first name and last name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6751, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ids of students whose advisors are professors.", "output": "SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = \"Professor\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the ids of students whose advisors are professors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6752, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which students have professors as their advisors? Find their student ids.", "output": "SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = \"Professor\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which students have professors as their advisors? Find their student ids.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6753, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show first name and last name for all the students advised by Michael Goodrich.", "output": "SELECT T2.fname , T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.fname = \"Michael\" AND T1.lname = \"Goodrich\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show first name and last name for all the students advised by Michael Goodrich.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6754, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which students are advised by Michael Goodrich? Give me their first and last names.", "output": "SELECT T2.fname , T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.fname = \"Michael\" AND T1.lname = \"Goodrich\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which students are advised by Michael Goodrich? Give me their first and last names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6755, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the faculty id of each faculty member, along with the number of students he or she advises.", "output": "SELECT T1.FacID , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the faculty id of each faculty member, along with the number of students he or she advises.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6756, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the faculty id and the number of students each faculty has?", "output": "SELECT T1.FacID , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the faculty id and the number of students each faculty has?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6757, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all the faculty ranks and the number of students advised by each rank.", "output": "SELECT T1.rank , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all the faculty ranks and the number of students advised by each rank.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6758, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many students are advised by each rank of faculty? List the rank and the number of students.", "output": "SELECT T1.rank , count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.rank", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many students are advised by each rank of faculty? List the rank and the number of students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6759, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first and last name of the faculty who has the most students?", "output": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first and last name of the faculty who has the most students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6760, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the the first and last name of the faculty who advises the most students.", "output": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the the first and last name of the faculty who advises the most students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6761, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ids for all the faculty members who have at least 2 students.", "output": "SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the ids for all the faculty members who have at least 2 students.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6762, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which faculty members advise two ore more students? Give me their faculty ids.", "output": "SELECT T1.FacID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which faculty members advise two ore more students? Give me their faculty ids.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6763, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show ids for the faculty members who don't advise any student.", "output": "SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show ids for the faculty members who don't advise any student.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6764, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the faculty members who do not advise any student.", "output": "SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the faculty members who do not advise any student.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6765, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What activities do we have?", "output": "SELECT activity_name FROM Activity", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What activities do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6766, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all the activities we have.", "output": "SELECT activity_name FROM Activity", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all the activities we have.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6767, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many activities do we have?", "output": "SELECT count(*) FROM Activity", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many activities do we have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6768, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of activities available.", "output": "SELECT count(*) FROM Activity", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of activities available.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6769, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many faculty members participate in an activity?", "output": "SELECT count(DISTINCT FacID) FROM Faculty_participates_in", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many faculty members participate in an activity?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6770, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the number of faculty members who participate in an activity", "output": "SELECT count(DISTINCT FacID) FROM Faculty_participates_in", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the number of faculty members who participate in an activity,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6771, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ids of the faculty who don't participate in any activity.", "output": "SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the ids of the faculty who don't participate in any activity.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6772, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which faculty do not participate in any activity? Find their faculty ids.", "output": "SELECT FacID FROM Faculty EXCEPT SELECT FacID FROM Faculty_participates_in", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which faculty do not participate in any activity? Find their faculty ids.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6773, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ids of all the faculty members who participate in an activity and advise a student.", "output": "SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the ids of all the faculty members who participate in an activity and advise a student.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6774, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are ids of the faculty members who not only participate in an activity but also advise a student.", "output": "SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are ids of the faculty members who not only participate in an activity but also advise a student.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6775, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many activities does Mark Giuliano participate in?", "output": "SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many activities does Mark Giuliano participate in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6776, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of activities Mark Giuliano is involved in.", "output": "SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of activities Mark Giuliano is involved in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6777, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the names of all the activities Mark Giuliano participates in.", "output": "SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the names of all the activities Mark Giuliano participates in.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6778, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the activities Mark Giuliano is involved in", "output": "SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN Activity AS T3 ON T3.actid = T2.actid WHERE T1.fname = \"Mark\" AND T1.lname = \"Giuliano\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the activities Mark Giuliano is involved in,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6779, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T1.fname , T1.lname , count(*) , T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6780, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "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.", "output": "SELECT T1.fname , T1.lname , count(*) , T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: 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.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6781, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all the activity names and the number of faculty involved in each activity.", "output": "SELECT T1.activity_name , count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all the activity names and the number of faculty involved in each activity.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6782, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many faculty members participate in each activity? Return the activity names and the number of faculty members.", "output": "SELECT T1.activity_name , count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many faculty members participate in each activity? Return the activity names and the number of faculty members.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6783, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first and last name of the faculty participating in the most activities?", "output": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first and last name of the faculty participating in the most activities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6784, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first and last name of the faculty who is involved in the largest number of activities.", "output": "SELECT T1.fname , T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first and last name of the faculty who is involved in the largest number of activities.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6785, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the activity that has the most faculty members involved in?", "output": "SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the activity that has the most faculty members involved in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6786, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which activity has the most faculty members participating in? Find the activity name.", "output": "SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which activity has the most faculty members participating in? Find the activity name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6787, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ids of the students who don't participate in any activity.", "output": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the ids of the students who don't participate in any activity.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6788, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the students who are not involved in any activity", "output": "SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the students who are not involved in any activity,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6789, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the ids for all the students who participate in an activity and are under 20.", "output": "SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the ids for all the students who participate in an activity and are under 20.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6790, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids of the students who are under 20 years old and are involved in at least one activity.", "output": "SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age < 20", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids of the students who are under 20 years old and are involved in at least one activity.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6791, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the first and last name of the student participating in the most activities?", "output": "SELECT T1.fname , T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the first and last name of the student participating in the most activities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6792, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Tell me the first and last name of the student who has the most activities.", "output": "SELECT T1.fname , T1.lname FROM Student AS T1 JOIN Participates_in AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Tell me the first and last name of the student who has the most activities.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6793, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the activity with the most students?", "output": "SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the activity with the most students?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6794, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the activity that has the largest number of student participants.", "output": "SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the activity that has the largest number of student participants.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6795, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of the faculty members who are playing Canoeing or Kayaking.", "output": "SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names of the faculty members who are playing Canoeing or Kayaking.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6796, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which faculty members are playing either Canoeing or Kayaking? Tell me their first names.", "output": "SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which faculty members are playing either Canoeing or Kayaking? Tell me their first names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6797, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of professors who are not playing Canoeing or Kayaking.", "output": "SELECT lname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names of professors who are not playing Canoeing or Kayaking.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6798, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of the professors who do not play Canoeing or Kayaking as activities?", "output": "SELECT lname FROM faculty WHERE rank = 'Professor' EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of the professors who do not play Canoeing or Kayaking as activities?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6799, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the first names of the faculty members who participate in Canoeing and Kayaking.", "output": "SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the first names of the faculty members who participate in Canoeing and Kayaking.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6800, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the first names of the faculty members playing both Canoeing and Kayaking?", "output": "SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Kayaking'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the first names of the faculty members playing both Canoeing and Kayaking?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6801, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the ids of the students who participate in Canoeing and Kayaking.", "output": "SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Kayaking'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the ids of the students who participate in Canoeing and Kayaking.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "activity_1", "id": 6802, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which students participate in both Canoeing and Kayaking as their activities? Tell me their student ids.", "output": "SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid = T2.actid WHERE T2.activity_name = 'Kayaking'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which students participate in both Canoeing and Kayaking as their activities? Tell me their student ids.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6803, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the airport in the city of Goroka.", "output": "SELECT name FROM airports WHERE city = 'Goroka'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the airport in the city of Goroka.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6804, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the airports in the city of Goroka?", "output": "SELECT name FROM airports WHERE city = 'Goroka'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the airports in the city of Goroka?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6805, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name, city, country, and altitude (or elevation) of the airports in the city of New York.", "output": "SELECT name , city , country , elevation FROM airports WHERE city = 'New York'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name, city, country, and altitude (or elevation) of the airports in the city of New York.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6806, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name, city, country, and elevation for every airport in the city of New York?", "output": "SELECT name , city , country , elevation FROM airports WHERE city = 'New York'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name, city, country, and elevation for every airport in the city of New York?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6807, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many airlines are there?", "output": "SELECT count(*) FROM airlines", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many airlines are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6808, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of airlines?", "output": "SELECT count(*) FROM airlines", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of airlines?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6809, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many airlines does Russia has?", "output": "SELECT count(*) FROM airlines WHERE country = 'Russia'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many airlines does Russia has?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6810, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of airlines based in Russia?", "output": "SELECT count(*) FROM airlines WHERE country = 'Russia'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of airlines based in Russia?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6811, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum elevation of all airports in the country of Iceland?", "output": "SELECT max(elevation) FROM airports WHERE country = 'Iceland'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the maximum elevation of all airports in the country of Iceland?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6812, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the highest elevation of an airport in the country of Iceland?", "output": "SELECT max(elevation) FROM airports WHERE country = 'Iceland'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the highest elevation of an airport in the country of Iceland?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6813, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the airports located in Cuba or Argentina.", "output": "SELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the airports located in Cuba or Argentina.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6814, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all airports in Cuba or Argentina?", "output": "SELECT name FROM airports WHERE country = 'Cuba' OR country = 'Argentina'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all airports in Cuba or Argentina?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6815, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the country of the airlines whose name starts with 'Orbit'.", "output": "SELECT country FROM airlines WHERE name LIKE 'Orbit%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the country of the airlines whose name starts with 'Orbit'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6816, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the countries of all airlines whose names start with Orbit?", "output": "SELECT country FROM airlines WHERE name LIKE 'Orbit%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the countries of all airlines whose names start with Orbit?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6817, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of airports whose altitude is between -50 and 50.", "output": "SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of airports whose altitude is between -50 and 50.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6818, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all airports whose elevation is between -50 and 50?", "output": "SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all airports whose elevation is between -50 and 50?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6819, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which country is the airport that has the highest altitude located in?", "output": "SELECT country FROM airports ORDER BY elevation DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which country is the airport that has the highest altitude located in?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6820, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the country of the airport with the highest elevation?", "output": "SELECT country FROM airports ORDER BY elevation DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the country of the airport with the highest elevation?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6821, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of airports whose name contain the word 'International'.", "output": "SELECT count(*) FROM airports WHERE name LIKE '%International%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of airports whose name contain the word 'International'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6822, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many airports' names have the word Interanation in them?", "output": "SELECT count(*) FROM airports WHERE name LIKE '%International%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many airports' names have the word Interanation in them?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6823, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many different cities do have some airport in the country of Greenland?", "output": "SELECT count(DISTINCT city) FROM airports WHERE country = 'Greenland'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many different cities do have some airport in the country of Greenland?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6824, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "In how many cities are there airports in the country of Greenland?", "output": "SELECT count(DISTINCT city) FROM airports WHERE country = 'Greenland'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: In how many cities are there airports in the country of Greenland?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6825, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of routes operated by American Airlines.", "output": "SELECT count(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of routes operated by American Airlines.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6826, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many routes does American Airlines operate?", "output": "SELECT count(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many routes does American Airlines operate?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6827, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of routes whose destination airports are in Canada.", "output": "SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE country = 'Canada'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of routes whose destination airports are in Canada.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6828, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many routes end in a Canadian airport?", "output": "SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE country = 'Canada'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many routes end in a Canadian airport?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6829, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name, city, and country of the airport that has the lowest altitude.", "output": "SELECT name , city , country FROM airports ORDER BY elevation LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name, city, and country of the airport that has the lowest altitude.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6830, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name, city, and country of the airport with the lowest altitude?", "output": "SELECT name , city , country FROM airports ORDER BY elevation LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name, city, and country of the airport with the lowest altitude?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6831, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name, city, and country of the airport that has the highest latitude.", "output": "SELECT name , city , country FROM airports ORDER BY elevation DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name, city, and country of the airport that has the highest latitude.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6832, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name, city, and country of the airport with the highest elevation?", "output": "SELECT name , city , country FROM airports ORDER BY elevation DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name, city, and country of the airport with the highest elevation?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6833, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and city of the airport which is the destination of the most number of routes.", "output": "SELECT T1.name , T1.city , T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid GROUP BY T2.dst_apid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and city of the airport which is the destination of the most number of routes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6834, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and city of the airport that the most routes end at?", "output": "SELECT T1.name , T1.city , T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid GROUP BY T2.dst_apid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and city of the airport that the most routes end at?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6835, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the top 10 airlines that operate the most number of routes.", "output": "SELECT T1.name , T2.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T2.alid ORDER BY count(*) DESC LIMIT 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the top 10 airlines that operate the most number of routes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6836, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For the airline ids with the top 10 most routes operated, what are their names?", "output": "SELECT T1.name , T2.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T2.alid ORDER BY count(*) DESC LIMIT 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For the airline ids with the top 10 most routes operated, what are their names?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6837, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name and city of the airport which is the source for the most number of flight routes.", "output": "SELECT T1.name , T1.city , T2.src_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T2.src_apid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name and city of the airport which is the source for the most number of flight routes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6838, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name and city of the airport from most of the routes start?", "output": "SELECT T1.name , T1.city , T2.src_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T2.src_apid ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name and city of the airport from most of the routes start?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6839, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of different airports which are the destinations of the American Airlines.", "output": "SELECT count(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of different airports which are the destinations of the American Airlines.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6840, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of different different airports that are destinations for American Airlines?", "output": "SELECT count(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of different different airports that are destinations for American Airlines?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6841, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which countries has the most number of airlines?", "output": "SELECT country FROM airlines GROUP BY country ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which countries has the most number of airlines?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6842, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the country with the most number of home airlines?", "output": "SELECT country FROM airlines GROUP BY country ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the country with the most number of home airlines?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6843, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which countries has the most number of airlines whose active status is 'Y'?", "output": "SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which countries has the most number of airlines whose active status is 'Y'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6844, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the countries with the most airlines whose active status is Y?", "output": "SELECT country FROM airlines WHERE active = 'Y' GROUP BY country ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the countries with the most airlines whose active status is Y?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6845, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all countries and their number of airlines in the descending order of number of airlines.", "output": "SELECT country , count(*) FROM airlines GROUP BY country ORDER BY count(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all countries and their number of airlines in the descending order of number of airlines.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6846, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many airlines operate out of each country in descending order?", "output": "SELECT country , count(*) FROM airlines GROUP BY country ORDER BY count(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many airlines operate out of each country in descending order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6847, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many airports are there per country? Order the countries by decreasing number of airports.", "output": "SELECT count(*) , country FROM airports GROUP BY country ORDER BY count(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many airports are there per country? Order the countries by decreasing number of airports.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6848, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of airports per country, ordered from most to least?", "output": "SELECT count(*) , country FROM airports GROUP BY country ORDER BY count(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of airports per country, ordered from most to least?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6849, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many airports are there per city in the United States? Order the cities by decreasing number of airports.", "output": "SELECT count(*) , city FROM airports WHERE country = 'United States' GROUP BY city ORDER BY count(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many airports are there per city in the United States? Order the cities by decreasing number of airports.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6850, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many airports are there per city in the US ordered from most to least?", "output": "SELECT count(*) , city FROM airports WHERE country = 'United States' GROUP BY city ORDER BY count(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many airports are there per city in the US ordered from most to least?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6851, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the cities with more than 3 airports in the United States.", "output": "SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING count(*) > 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the cities with more than 3 airports in the United States.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6852, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of cities in the United States with more than 3 airports?", "output": "SELECT city FROM airports WHERE country = 'United States' GROUP BY city HAVING count(*) > 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of cities in the United States with more than 3 airports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6853, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many cities are there that have more than 3 airports?", "output": "SELECT count(*) FROM (SELECT city FROM airports GROUP BY city HAVING count(*) > 3)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many cities are there that have more than 3 airports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6854, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the count of cities with more than 3 airports?", "output": "SELECT count(*) FROM (SELECT city FROM airports GROUP BY city HAVING count(*) > 3)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the count of cities with more than 3 airports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6855, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the cities which have more than one airport and number of airports.", "output": "SELECT city , count(*) FROM airports GROUP BY city HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the cities which have more than one airport and number of airports.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6856, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of all cities with more than one airport and how many airports do they have?", "output": "SELECT city , count(*) FROM airports GROUP BY city HAVING count(*) > 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of all cities with more than one airport and how many airports do they have?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6857, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the cities which have more than 2 airports sorted by the number of airports.", "output": "SELECT city FROM airports GROUP BY city HAVING count(*) > 2 ORDER BY count(*)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the cities which have more than 2 airports sorted by the number of airports.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6858, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the cities that have more than 2 airports sorted by number of airports?", "output": "SELECT city FROM airports GROUP BY city HAVING count(*) > 2 ORDER BY count(*)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the cities that have more than 2 airports sorted by number of airports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6859, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of routes for each source airport and the airport name.", "output": "SELECT count(*) , T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of routes for each source airport and the airport name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6860, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each airport name, how many routes start at that airport?", "output": "SELECT count(*) , T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each airport name, how many routes start at that airport?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6861, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of routes and airport name for each source airport, order the results by decreasing number of routes.", "output": "SELECT count(*) , T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name ORDER BY count(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of routes and airport name for each source airport, order the results by decreasing number of routes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6862, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each airport name, how many routes start at that airport, ordered from most to least?", "output": "SELECT count(*) , T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T1.name ORDER BY count(*) DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each airport name, how many routes start at that airport, ordered from most to least?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6863, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the average elevation of all airports for each country.", "output": "SELECT avg(elevation) , country FROM airports GROUP BY country", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the average elevation of all airports for each country.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6864, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each country, what is the average elevation of that country's airports?", "output": "SELECT avg(elevation) , country FROM airports GROUP BY country", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each country, what is the average elevation of that country's airports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6865, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the cities which have exactly two airports.", "output": "SELECT city FROM airports GROUP BY city HAVING count(*) = 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the cities which have exactly two airports.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6866, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the cities with exactly two airports?", "output": "SELECT city FROM airports GROUP BY city HAVING count(*) = 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the cities with exactly two airports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6867, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each country and airline name, how many routes are there?", "output": "SELECT T1.country , T1.name , count(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.country , T1.name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each country and airline name, how many routes are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6868, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the total number of routes for each country and airline in that country?", "output": "SELECT T1.country , T1.name , count(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.country , T1.name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the total number of routes for each country and airline in that country?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6869, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of routes with destination airports in Italy.", "output": "SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of routes with destination airports in Italy.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6870, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of routes whose destinations are Italian airports?", "output": "SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = 'Italy'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of routes whose destinations are Italian airports?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6871, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the number of routes with destination airport in Italy operated by the airline with name 'American Airlines'.", "output": "SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid JOIN airlines AS T3 ON T1.alid = T3.alid WHERE T2.country = 'Italy' AND T3.name = 'American Airlines'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the number of routes with destination airport in Italy operated by the airline with name 'American Airlines'.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6872, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of routes operated by the airline American Airlines whose destinations are in Italy?", "output": "SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid JOIN airlines AS T3 ON T1.alid = T3.alid WHERE T2.country = 'Italy' AND T3.name = 'American Airlines'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of routes operated by the airline American Airlines whose destinations are in Italy?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6873, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of routes that have destination John F Kennedy International Airport.", "output": "SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of routes that have destination John F Kennedy International Airport.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6874, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the number of routes that end at John F Kennedy International Airport?", "output": "SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the number of routes that end at John F Kennedy International Airport?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6875, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the number of routes from the United States to Canada.", "output": "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')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the number of routes from the United States to Canada.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6876, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many routes go from the United States to Canada?", "output": "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')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many routes go from the United States to Canada?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6877, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of routes whose source and destination airports are in the United States.", "output": "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')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id of routes whose source and destination airports are in the United States.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6878, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the routes whose source and destination airports are in the United States?", "output": "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')", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the routes whose source and destination airports are in the United States?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6879, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of airline which runs the most number of routes.", "output": "SELECT T1.name FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of airline which runs the most number of routes.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6880, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the airline with the most routes?", "output": "SELECT T1.name FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the airline with the most routes?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6881, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the busiest source airport that runs most number of routes in China.", "output": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the busiest source airport that runs most number of routes in China.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6882, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the airport with the most number of routes that start in China?", "output": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the airport with the most number of routes that start in China?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6883, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the busiest destination airport that runs most number of routes in China.", "output": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the busiest destination airport that runs most number of routes in China.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "flight_4", "id": 6884, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the airport that is the destination of the most number of routes that start in China?", "output": "SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the airport that is the destination of the most number of routes that start in China?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6885, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the most recent order?", "output": "SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the most recent order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6886, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of the order made most recently.", "output": "SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id of the order made most recently.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6887, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "what are the order id and customer id of the oldest order?", "output": "SELECT order_id , customer_id FROM orders ORDER BY date_order_placed LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: what are the order id and customer id of the oldest order?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6888, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the order id and customer id associated with the oldest order.", "output": "SELECT order_id , customer_id FROM orders ORDER BY date_order_placed LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the order id and customer id associated with the oldest order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6889, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of the order whose shipment tracking number is \"3452\".", "output": "SELECT order_id FROM shipments WHERE shipment_tracking_number = \"3452\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id of the order whose shipment tracking number is \"3452\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6890, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which order's shipment tracking number is \"3452\"? Give me the id of the order.", "output": "SELECT order_id FROM shipments WHERE shipment_tracking_number = \"3452\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which order's shipment tracking number is \"3452\"? Give me the id of the order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6891, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the ids of all the order items whose product id is 11.", "output": "SELECT order_item_id FROM order_items WHERE product_id = 11", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the ids of all the order items whose product id is 11.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6892, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find all the order items whose product id is 11. What are the order item ids?", "output": "SELECT order_item_id FROM order_items WHERE product_id = 11", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find all the order items whose product id is 11. What are the order item ids?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6893, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name of all the distinct customers who have orders with status \"Packing\".", "output": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Packing\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name of all the distinct customers who have orders with status \"Packing\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6894, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customers have orders with status \"Packing\"? Give me the customer names.", "output": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Packing\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customers have orders with status \"Packing\"? Give me the customer names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6895, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the details of all the distinct customers who have orders with status \"On Road\".", "output": "SELECT DISTINCT T1.customer_details FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the details of all the distinct customers who have orders with status \"On Road\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6896, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct customers who have orders with status \"On Road\"? Give me the customer details?", "output": "SELECT DISTINCT T1.customer_details FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct customers who have orders with status \"On Road\"? Give me the customer details?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6897, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the customer who has the most orders?", "output": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the customer who has the most orders?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6898, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customer made the most orders? Find the customer name.", "output": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customer made the most orders? Find the customer name.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6899, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the customer id of the customer who has the most orders?", "output": "SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the customer id of the customer who has the most orders?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6900, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of the customer who made the most orders.", "output": "SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id of the customer who made the most orders.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6901, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me a list of id and status of orders which belong to the customer named \"Jeramie\".", "output": "SELECT T2.order_id , T2.order_status FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = \"Jeramie\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me a list of id and status of orders which belong to the customer named \"Jeramie\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6902, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which orders are made by the customer named \"Jeramie\"? Give me the order ids and status.", "output": "SELECT T2.order_id , T2.order_status FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = \"Jeramie\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which orders are made by the customer named \"Jeramie\"? Give me the order ids and status.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6903, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the dates of orders which belong to the customer named \"Jeramie\".", "output": "SELECT T2.date_order_placed FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = \"Jeramie\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the dates of orders which belong to the customer named \"Jeramie\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6904, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the dates of the orders made by the customer named \"Jeramie\"?", "output": "SELECT T2.date_order_placed FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = \"Jeramie\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the dates of the orders made by the customer named \"Jeramie\"?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6905, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me the names of customers who have placed orders between 2009-01-01 and 2010-01-01.", "output": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.date_order_placed >= \"2009-01-01\" AND T2.date_order_placed <= \"2010-01-01\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me the names of customers who have placed orders between 2009-01-01 and 2010-01-01.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6906, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customers made orders between 2009-01-01 and 2010-01-01? Find their names.", "output": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.date_order_placed >= \"2009-01-01\" AND T2.date_order_placed <= \"2010-01-01\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customers made orders between 2009-01-01 and 2010-01-01? Find their names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6907, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Give me a list of distinct product ids from orders placed between 1975-01-01 and 1976-01-01?", "output": "SELECT DISTINCT T2.product_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id WHERE T1.date_order_placed >= \"1975-01-01\" AND T1.date_order_placed <= \"1976-01-01\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Give me a list of distinct product ids from orders placed between 1975-01-01 and 1976-01-01?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6908, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct ids of products ordered between 1975-01-01 and 1976-01-01??", "output": "SELECT DISTINCT T2.product_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id WHERE T1.date_order_placed >= \"1975-01-01\" AND T1.date_order_placed <= \"1976-01-01\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct ids of products ordered between 1975-01-01 and 1976-01-01??,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6909, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the names of the customers who have order status both \"On Road\" and \"Shipped\".", "output": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\" INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Shipped\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the names of the customers who have order status both \"On Road\" and \"Shipped\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6910, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customers have both \"On Road\" and \"Shipped\" as order status? List the customer names.", "output": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\" INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Shipped\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customers have both \"On Road\" and \"Shipped\" as order status? List the customer names.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6911, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of the customers who have order status both \"On Road\" and \"Shipped\".", "output": "SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\" INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Shipped\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id of the customers who have order status both \"On Road\" and \"Shipped\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6912, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customers have both \"On Road\" and \"Shipped\" as order status? List the customer ids.", "output": "SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"On Road\" INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = \"Shipped\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customers have both \"On Road\" and \"Shipped\" as order status? List the customer ids.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6913, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "When was the order placed whose shipment tracking number is 3452? Give me the date.", "output": "SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.shipment_tracking_number = 3452", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: When was the order placed whose shipment tracking number is 3452? Give me the date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6914, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "On which day was the order placed whose shipment tracking number is 3452?", "output": "SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.shipment_tracking_number = 3452", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: On which day was the order placed whose shipment tracking number is 3452?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6915, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the placement date of the order whose invoice number is 10?", "output": "SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.invoice_number = 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the placement date of the order whose invoice number is 10?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6916, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "On what day was the order with invoice number 10 placed?", "output": "SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.invoice_number = 10", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: On what day was the order with invoice number 10 placed?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6917, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the count and id of each product in all the orders.", "output": "SELECT count(*) , T3.product_id FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the count and id of each product in all the orders.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6918, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each product, return its id and the number of times it was ordered.", "output": "SELECT count(*) , T3.product_id FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each product, return its id and the number of times it was ordered.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6919, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name and count of each product in all orders.", "output": "SELECT T3.product_name , count(*) FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name and count of each product in all orders.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6920, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each product, show its name and the number of times it was ordered.", "output": "SELECT T3.product_name , count(*) FROM orders AS T1 JOIN order_items AS T2 JOIN products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each product, show its name and the number of times it was ordered.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6921, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the ids of orders which are shipped after 2000-01-01.", "output": "SELECT order_id FROM shipments WHERE shipment_date > \"2000-01-01\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the ids of orders which are shipped after 2000-01-01.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6922, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which orders have shipment after 2000-01-01? Give me the order ids.", "output": "SELECT order_id FROM shipments WHERE shipment_date > \"2000-01-01\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which orders have shipment after 2000-01-01? Give me the order ids.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6923, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the id of the order which is shipped most recently.", "output": "SELECT order_id FROM shipments WHERE shipment_date = (SELECT max(shipment_date) FROM shipments)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the id of the order which is shipped most recently.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6924, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which order has the most recent shipment? Give me the order id.", "output": "SELECT order_id FROM shipments WHERE shipment_date = (SELECT max(shipment_date) FROM shipments)", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which order has the most recent shipment? Give me the order id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6925, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of all distinct products in alphabetical order.", "output": "SELECT DISTINCT product_name FROM products ORDER BY product_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of all distinct products in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6926, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Sort all the distinct products in alphabetical order.", "output": "SELECT DISTINCT product_name FROM products ORDER BY product_name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Sort all the distinct products in alphabetical order.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6927, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the ids of all distinct orders ordered by placed date.", "output": "SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the ids of all distinct orders ordered by placed date.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6928, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are ids of the all distinct orders, sorted by placement date?", "output": "SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are ids of the all distinct orders, sorted by placement date?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6929, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id of the order which has the most items?", "output": "SELECT T1.order_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id of the order which has the most items?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6930, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which order deals with the most items? Return the order id.", "output": "SELECT T1.order_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which order deals with the most items? Return the order id.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6931, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the name of the customer who has the largest number of orders?", "output": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the name of the customer who has the largest number of orders?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6932, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the customer who made the most orders.", "output": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the customer who made the most orders.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6933, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the invoice numbers which are created before 1989-09-03 or after 2007-12-25.", "output": "SELECT invoice_number FROM invoices WHERE invoice_date < \"1989-09-03\" OR invoice_date > \"2007-12-25\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the invoice numbers which are created before 1989-09-03 or after 2007-12-25.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6934, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the invoice numbers created before 1989-09-03 or after 2007-12-25?", "output": "SELECT invoice_number FROM invoices WHERE invoice_date < \"1989-09-03\" OR invoice_date > \"2007-12-25\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the invoice numbers created before 1989-09-03 or after 2007-12-25?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6935, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the distinct details of invoices which are created before 1989-09-03 or after 2007-12-25.", "output": "SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < \"1989-09-03\" OR invoice_date > \"2007-12-25\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the distinct details of invoices which are created before 1989-09-03 or after 2007-12-25.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6936, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct details of invoices created before 1989-09-03 or after 2007-12-25?", "output": "SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < \"1989-09-03\" OR invoice_date > \"2007-12-25\"", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct details of invoices created before 1989-09-03 or after 2007-12-25?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6937, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "For each customer who has at least two orders, find the customer name and number of orders made.", "output": "SELECT T2.customer_name , count(*) FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: For each customer who has at least two orders, find the customer name and number of orders made.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6938, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customers have made at least two orders? Give me each customer name and number of orders made.", "output": "SELECT T2.customer_name , count(*) FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customers have made at least two orders? Give me each customer name and number of orders made.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6939, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Find the name of the customers who have at most two orders.", "output": "SELECT T2.customer_name FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*) <= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Find the name of the customers who have at most two orders.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6940, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the customers who have made two or less orders?", "output": "SELECT T2.customer_name FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*) <= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the customers who have made two or less orders?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6941, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of the customers who have once bought product \"food\".", "output": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T4.product_name = \"food\" GROUP BY T1.customer_id HAVING count(*) >= 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of the customers who have once bought product \"food\".,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6942, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the customers who bought product \"food\" at least once?", "output": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T4.product_name = \"food\" GROUP BY T1.customer_id HAVING count(*) >= 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the customers who bought product \"food\" at least once?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6943, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the names of customers who have once canceled the purchase of the product \"food\" (the item status is \"Cancel\").", "output": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T3.order_item_status = \"Cancel\" AND T4.product_name = \"food\" GROUP BY T1.customer_id HAVING count(*) >= 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the names of customers who have once canceled the purchase of the product \"food\" (the item status is \"Cancel\").,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "tracking_orders", "id": 6944, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which customers have ever canceled the purchase of the product \"food\" (the item status is \"Cancel\")?", "output": "SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T3.order_item_status = \"Cancel\" AND T4.product_name = \"food\" GROUP BY T1.customer_id HAVING count(*) >= 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which customers have ever canceled the purchase of the product \"food\" (the item status is \"Cancel\")?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "architecture", "id": 6945, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many architects are female?", "output": "SELECT count(*) FROM architect WHERE gender = 'female'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many architects are female?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "architecture", "id": 6946, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List the name, nationality and id of all male architects ordered by their names lexicographically.", "output": "SELECT name , nationality , id FROM architect WHERE gender = 'male' ORDER BY name", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List the name, nationality and id of all male architects ordered by their names lexicographically.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "architecture", "id": 6947, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the maximum length in meters for the bridges and what are the architects' names?", "output": "SELECT max(T1.length_meters) , T2.name FROM bridge AS T1 JOIN architect AS T2 ON T1.architect_id = T2.id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the maximum length in meters for the bridges and what are the architects' names?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "architecture", "id": 6948, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average length in feet of the bridges?", "output": "SELECT avg(length_feet) FROM bridge", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average length in feet of the bridges?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "architecture", "id": 6949, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names and year of construction for the mills of 'Grondzeiler' type?", "output": "SELECT name , built_year FROM mill WHERE TYPE = 'Grondzeiler'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names and year of construction for the mills of 'Grondzeiler' type?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "architecture", "id": 6950, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct names and nationalities of the architects who have ever built a mill?", "output": "SELECT DISTINCT T1.name , T1.nationality FROM architect AS T1 JOIN mill AS t2 ON T1.id = T2.architect_id", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct names and nationalities of the architects who have ever built a mill?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "architecture", "id": 6951, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the names of the mills which are not located in 'Donceel'?", "output": "SELECT name FROM mill WHERE LOCATION != 'Donceel'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the names of the mills which are not located in 'Donceel'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "architecture", "id": 6952, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct types of mills that are built by American or Canadian architects?", "output": "SELECT DISTINCT T1.type FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id = T2.id WHERE T2.nationality = 'American' OR T2.nationality = 'Canadian'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct types of mills that are built by American or Canadian architects?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "architecture", "id": 6953, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids and names of the architects who built at least 3 bridges ?", "output": "SELECT T1.id , T1.name FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count(*) >= 3", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids and names of the architects who built at least 3 bridges ?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "architecture", "id": 6954, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the id, name and nationality of the architect who built most mills?", "output": "SELECT T1.id , T1.name , T1.nationality FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the id, name and nationality of the architect who built most mills?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "architecture", "id": 6955, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the ids, names and genders of the architects who built two bridges or one mill?", "output": "SELECT T1.id , T1.name , T1.gender FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count(*) = 2 UNION SELECT T1.id , T1.name , T1.gender FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING count(*) = 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the ids, names and genders of the architects who built two bridges or one mill?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "architecture", "id": 6956, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?", "output": "SELECT LOCATION FROM bridge WHERE name = 'Kolob Arch' OR name = 'Rainbow Bridge'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "architecture", "id": 6957, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which of the mill names contains the french word 'Moulin'?", "output": "SELECT name FROM mill WHERE name LIKE '%Moulin%'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which of the mill names contains the french word 'Moulin'?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "architecture", "id": 6958, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters?", "output": "SELECT DISTINCT T1.name FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id = T2.id JOIN bridge AS T3 ON T3.architect_id = T2.id WHERE T3.length_meters > 80", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "architecture", "id": 6959, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the most common mill type, and how many are there?", "output": "SELECT TYPE , count(*) FROM mill GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the most common mill type, and how many are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "architecture", "id": 6960, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many architects haven't built a mill before year 1850?", "output": "SELECT count(*) FROM architect WHERE id NOT IN ( SELECT architect_id FROM mill WHERE built_year < 1850 );", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many architects haven't built a mill before year 1850?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "architecture", "id": 6961, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "show the name of all bridges that was designed by american archtect, and sort the result by the bridge feet length.", "output": "SELECT t1.name FROM bridge AS t1 JOIN architect AS t2 ON t1.architect_id = t2.id WHERE t2.nationality = 'American' ORDER BY t1.length_feet", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: show the name of all bridges that was designed by american archtect, and sort the result by the bridge feet length.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6962, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many book clubs are there?", "output": "SELECT count(*) FROM book_club", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many book clubs are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6963, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of book clubs.", "output": "SELECT count(*) FROM book_club", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of book clubs.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6964, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "show the titles, and authors or editors for all books made after the year 1989.", "output": "SELECT book_title , author_or_editor FROM book_club WHERE YEAR > 1989", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: show the titles, and authors or editors for all books made after the year 1989.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6965, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles and authors or editors that correspond to books made after 1989?", "output": "SELECT book_title , author_or_editor FROM book_club WHERE YEAR > 1989", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the titles and authors or editors that correspond to books made after 1989?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6966, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all distinct publishers for books.", "output": "SELECT DISTINCT publisher FROM book_club", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all distinct publishers for books.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6967, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the different book publishers?", "output": "SELECT DISTINCT publisher FROM book_club", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the different book publishers?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6968, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the years, book titles, and publishers for all books, in descending order by year.", "output": "SELECT YEAR , book_title , publisher FROM book_club ORDER BY YEAR DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the years, book titles, and publishers for all books, in descending order by year.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6969, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the years, titles, and publishers for all books, ordered by year descending?", "output": "SELECT YEAR , book_title , publisher FROM book_club ORDER BY YEAR DESC", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the years, titles, and publishers for all books, ordered by year descending?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6970, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all publishers and the number of books for each publisher.", "output": "SELECT publisher , count(*) FROM book_club GROUP BY publisher", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all publishers and the number of books for each publisher.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6971, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many books are there for each publisher?", "output": "SELECT publisher , count(*) FROM book_club GROUP BY publisher", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many books are there for each publisher?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6972, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the publisher with most number of books?", "output": "SELECT publisher FROM book_club GROUP BY publisher ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the publisher with most number of books?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6973, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the publisher that has published the most books.", "output": "SELECT publisher FROM book_club GROUP BY publisher ORDER BY count(*) DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the publisher that has published the most books.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6974, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all book categories and the number of books in each category.", "output": "SELECT category , count(*) FROM book_club GROUP BY category", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all book categories and the number of books in each category.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6975, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many books fall into each category?", "output": "SELECT category , count(*) FROM book_club GROUP BY category", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many books fall into each category?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6976, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List categories that have at least two books after year 1989.", "output": "SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List categories that have at least two books after year 1989.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6977, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What categories have two or more corresponding books that were made after 1989?", "output": "SELECT category FROM book_club WHERE YEAR > 1989 GROUP BY category HAVING count(*) >= 2", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What categories have two or more corresponding books that were made after 1989?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6978, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show publishers with a book published in 1989 and a book in 1990.", "output": "SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show publishers with a book published in 1989 and a book in 1990.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6979, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the publishers who have published a book in both 1989 and 1990?", "output": "SELECT publisher FROM book_club WHERE YEAR = 1989 INTERSECT SELECT publisher FROM book_club WHERE YEAR = 1990", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the publishers who have published a book in both 1989 and 1990?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6980, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all publishers which do not have a book in 1989.", "output": "SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all publishers which do not have a book in 1989.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6981, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which publishers did not publish a book in 1989?", "output": "SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR = 1989", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which publishers did not publish a book in 1989?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6982, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all movie titles, years, and directors, ordered by budget.", "output": "SELECT title , YEAR , director FROM movie ORDER BY budget_million", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all movie titles, years, and directors, ordered by budget.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6983, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles, years, and directors of all movies, ordered by budget in millions?", "output": "SELECT title , YEAR , director FROM movie ORDER BY budget_million", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the titles, years, and directors of all movies, ordered by budget in millions?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6984, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "How many movie directors are there?", "output": "SELECT COUNT (DISTINCT director) FROM movie", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: How many movie directors are there?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6985, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Count the number of different directors.", "output": "SELECT COUNT (DISTINCT director) FROM movie", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Count the number of different directors.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6986, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the title and director for the movie with highest worldwide gross in the year 2000 or before?", "output": "SELECT title , director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the title and director for the movie with highest worldwide gross in the year 2000 or before?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6987, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the title and director of the movie released in the year 2000 or earlier that had the highest worldwide gross.", "output": "SELECT title , director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the title and director of the movie released in the year 2000 or earlier that had the highest worldwide gross.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6988, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all director names who have a movie in both year 1999 and 2000.", "output": "SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all director names who have a movie in both year 1999 and 2000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6989, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which directors had a movie both in the year 1999 and 2000?", "output": "SELECT director FROM movie WHERE YEAR = 2000 INTERSECT SELECT director FROM movie WHERE YEAR = 1999", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which directors had a movie both in the year 1999 and 2000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6990, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all director names who have a movie in the year 1999 or 2000.", "output": "SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all director names who have a movie in the year 1999 or 2000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6991, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Which directors had a movie in either 1999 or 2000?", "output": "SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Which directors had a movie in either 1999 or 2000?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6992, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What is the average, maximum, and minimum budget for all movies before 2000.", "output": "SELECT avg(budget_million) , max(budget_million) , min(budget_million) FROM movie WHERE YEAR < 2000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What is the average, maximum, and minimum budget for all movies before 2000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6993, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Return the average, maximum, and minimum budgets in millions for movies made before the year 2000.", "output": "SELECT avg(budget_million) , max(budget_million) , min(budget_million) FROM movie WHERE YEAR < 2000", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Return the average, maximum, and minimum budgets in millions for movies made before the year 2000.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6994, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "List all company names with a book published by Alyson.", "output": "SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id = T2.book_club_id WHERE T2.publisher = 'Alyson'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: List all company names with a book published by Alyson.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6995, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all the company names that have a book published by Alyson?", "output": "SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id = T2.book_club_id WHERE T2.publisher = 'Alyson'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all the company names that have a book published by Alyson?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6996, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show the movie titles and book titles for all companies in China.", "output": "SELECT T1.title , T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id JOIN book_club AS T3 ON T3.book_club_id = T2.book_club_id WHERE T2.incorporated_in = 'China'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show the movie titles and book titles for all companies in China.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6997, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are the titles of movies and books corresponding to companies incorporated in China?", "output": "SELECT T1.title , T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id JOIN book_club AS T3 ON T3.book_club_id = T2.book_club_id WHERE T2.incorporated_in = 'China'", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are the titles of movies and books corresponding to companies incorporated in China?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6998, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "Show all company names with a movie directed in year 1999.", "output": "SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: Show all company names with a movie directed in year 1999.,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"} {"db_id": "culture_company", "id": 6999, "instruction": "You are an SQL expert. and proficient with the text-to-sql task.", "question": "What are all company names that have a corresponding movie directed in the year 1999?", "output": "SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999", "input": "Based on \n# the table&column(database schema) information {'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']} and \n# the user question: What are all company names that have a corresponding movie directed in the year 1999?,\nGive me the right SQL query to retrieve the information. Only SQL query, no explaination. # SQL query:"}